Skip to content

Mark the docs dependencies for the Python they need - #503

Merged
chrismattmann merged 1 commit into
masterfrom
let-uv-resolve-the-test-group
Nov 9, 2026
Merged

chrismattmann merged 1 commit into
masterfrom
let-uv-resolve-the-test-group

Conversation

@chrismattmann

Copy link
Copy Markdown
Owner

uv run --group tests cannot resolve this project on Python 3.10 or 3.11. It fails over a documentation dependency while trying to run the tests:

Because the requested Python version (>=3.10) does not satisfy
Python>=3.12 and sphinx>=9.1.0,<=9.1.1 depends on Python>=3.12, we can
conclude that sphinx>=9.1.0,<=9.1.1 cannot be used.
...
And because tika:docs depends on sphinx>=9.1 and your project requires
tika:docs, we can conclude that your project's requirements are
unsatisfiable.

requires-python is >=3.10, and that is correct — tika itself runs there and the classifiers say so. But sphinx 9.1 requires >=3.12, and furo pulls sphinx. pip never notices, because it resolves for the one interpreter in front of it and CI builds the docs on 3.14. uv resolves every supported Python at once, so the conflict surfaces there — and takes the unrelated tests group down with it.

Marking the three docs dependencies python_version>='3.12' states what was already true and lets the other groups resolve.

Verified

command result
uv run --python 3.10 --group tests 28 passed
uv run --python 3.12 --group tests resolves
uv run --python 3.14 --group docs sphinx 9.2.0
uv run --python 3.10 --group docs installs nothing, as declared

The trade-off

That last row is the cost: asking for the docs group on 3.10 now gets you an empty group rather than an error naming sphinx. Building the docs needs 3.12 or newer — which is what the markers now say, and what CI already does.

The alternative was raising requires-python to >=3.12, which would drop 3.10 and 3.11 for everyone using the library in order to fix a docs-tooling constraint. That seemed clearly worse.

No uv.lock is committed. This project doesn't have one, and adding one changes how contributors work, so it belongs in its own change.

`uv run --group tests` cannot resolve this project on Python 3.10 or 3.11, and
fails over a documentation dependency while trying to run the tests:

    Because the requested Python version (>=3.10) does not satisfy
    Python>=3.12 and sphinx>=9.1.0,<=9.1.1 depends on Python>=3.12, we can
    conclude that sphinx>=9.1.0,<=9.1.1 cannot be used.
    ...
    And because tika:docs depends on sphinx>=9.1 and your project requires
    tika:docs, we can conclude that your project's requirements are
    unsatisfiable.

requires-python is >=3.10 for the library, which is correct -- tika itself runs
there, and the classifiers say so. sphinx 9.1 needs >=3.12, and furo pulls
sphinx. pip never notices because it resolves for the interpreter in front of
it, and CI builds the docs on 3.14; uv resolves every supported version at
once, so the conflict surfaces there and takes the test group down with it.

Marking the three docs dependencies `python_version>='3.12'` states what was
already true and lets the other groups resolve. Verified:

  uv run --python 3.10 --group tests  -> 28 passed
  uv run --python 3.12 --group tests  -> resolves
  uv run --python 3.14 --group docs   -> sphinx 9.2.0
  uv run --python 3.10 --group docs   -> installs nothing, as declared

The last one is the trade-off: asking for the docs group on 3.10 now gets you
an empty group rather than an error about sphinx. Building the docs needs 3.12
or newer, which is what the markers say and what CI already does.

No uv.lock is committed. This project does not have one, and adding one
changes how contributors work, so it is a separate decision.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 67.176%. remained the same — let-uv-resolve-the-test-group into master

@chrismattmann chrismattmann self-assigned this Nov 9, 2026
@chrismattmann chrismattmann added this to the tika-next milestone Nov 9, 2026
@chrismattmann
chrismattmann merged commit 500f5b9 into master Nov 9, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants