From 3cfe4a6a5fb21e0a686fa9c49a56a2585ab03145 Mon Sep 17 00:00:00 2001 From: Chris Mattmann Date: Mon, 9 Nov 2026 13:31:54 -0800 Subject: [PATCH] Mark the docs dependencies for the Python they need `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. --- pyproject.toml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1cae4c48..342aa595 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,10 +41,15 @@ tests = [ "pytest-benchmark", "pytest-cov", ] +# Marked for 3.12 and up because that is what these versions actually need: +# sphinx 9.1 requires >=3.12, and furo pulls sphinx. requires-python here is +# >=3.10 for the library itself, and uv resolves every supported version at +# once, so without these markers `uv run --group tests` fails to resolve on +# 3.10 and 3.11 over a documentation dependency. CI builds the docs on 3.14. docs = [ - "furo>=2025.12.19", - "myst-parser>=5.0", - "sphinx>=9.1", + "furo>=2025.12.19; python_version>='3.12'", + "myst-parser>=5.0; python_version>='3.12'", + "sphinx>=9.1; python_version>='3.12'", ] [project.urls]