WeKnora/docreader/pyproject.toml

31 lines
725 B
TOML
Raw Normal View History

[project]
name = "docreader"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10.18"
dependencies = [
"beautifulsoup4>=4.14.2",
"ebooklib>=0.18",
fix(docreader): bump grpcio floor to 1.78.0 to match generated proto docreader fails to start on a fresh `uv sync` of main: $ uv sync --frozen $ uv run python -m docreader.main Traceback (most recent call last): ... File ".../docreader/proto/docreader_pb2_grpc.py", line 19, in <module> raise RuntimeError(...) RuntimeError: The grpc package installed is at version 1.76.0, but the generated code in docreader_pb2_grpc.py depends on grpcio>=1.78.0. Please upgrade your grpc module to grpcio>=1.78.0 or downgrade your generated code using grpcio-tools<=1.76.0. `docreader_pb2_grpc.py:8` was regenerated with grpcio-tools 1.78+ and hardcodes `GRPC_GENERATED_VERSION = '1.78.0'`, then at import time runs `first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)` and raises if the installed runtime is older. But `pyproject.toml` still pins: "grpcio>=1.76.0", "grpcio-health-checking>=1.76.0", "grpcio-tools>=1.76.0", …and `uv.lock` resolves to grpcio 1.76.0. So every fresh clone + `uv sync` ends up with a docreader that crashes on import, and a WeKnora backend that thinks docreader is "not connected" — silently falling back to the Go-side static engine registry only. Downstream user-visible symptom: `/api/v1/system/parser-engines` returns just the Go-side engines. Python-only engines (e.g. markitdown, plus any custom Python parsers) never appear in the KB create/edit form. Document parsing falls back to mineru/builtin even when the user intended to use docreader-backed engines. Reproduce on main (before this commit): cd docreader uv sync --frozen uv run python -m docreader.main # → RuntimeError at import, server never starts After this commit: Resolved 79 packages Updated grpcio v1.76.0 -> v1.80.0 Updated grpcio-health-checking v1.76.0 -> v1.80.0 Updated grpcio-tools v1.76.0 -> v1.80.0 ... $ uv run python -c "from docreader.proto import docreader_pb2_grpc; print('ok')" ok Fix is the minimum-floor bump on the three grpcio packages, plus the lockfile update uv emits as a result (all 1.76.0 → 1.80.0, newest stable matching the proto's floor). No proto regen, no code change — just aligning the dep declaration with what the generated client already requires. The next regen of docreader_pb2_grpc.py (e.g. with grpcio-tools 1.80+) would raise the floor again; pinning at the proto's declared floor is the conservative choice that keeps this in sync.
2026-05-17 03:46:53 +00:00
"grpcio>=1.78.0",
"grpcio-health-checking>=1.78.0",
"grpcio-tools>=1.78.0",
"lxml>=6.1.0",
"markdownify>=0.13.1",
"markitdown[docx,pdf,xls,xlsx]>=0.1.3",
"opendataloader-pdf>=2.4.7",
"openpyxl>=3.1.0",
"pandas>=2.0.0",
"xlrd>=2.0.0",
"pillow>=12.2.0",
"playwright>=1.55.0",
"protobuf>=6.33.5",
"pydantic>=2.13.4",
"pypdf>=6.13.3",
"pypdfium2>=5.8.0",
"python-docx>=1.2.0",
"requests>=2.33.0",
"textract==1.5.0",
"trafilatura>=2.0.0",
]