Require a lower bound on every dependency in pyproject.toml - #71378
Conversation
An unbounded requirement lets the resolver answer with any version that has ever been published, so what our constraints pin - and what a user ends up installing - depends on how the resolution went rather than on what the code needs. Four such requirements were found and fixed by hand while pinning providers in constraints (apache#71324); they sat in four different dependency tables, which is why they went unnoticed for so long. Distributions that are members of the uv workspace are exempt - they resolve from the checkout, so a version range would say nothing - as are direct URL requirements, where the URL already names the exact artifact.
663531d to
36d98d6
Compare
|
All resolved @Lee-W except the python req |
|
I kinda like it to be relaxed and already suggested it for a few times on different PRs already 🤔 We can still update the lowest python version all at once when relaxed. but I'm not going to block this PR. |
Problem with relaxing is also that prek hooks are pretty "sensitive" to Python version - for example AST might have some changes, in different Python versions, or MyPY will work differently or. ...... (there were multiple cases in the past. And a bit of a problem here as well that this introduces "works-for-me" syndrom if people are using different Python versions in CI and locally - the a) prevents this |
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker cf4c769 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
Adds a
check-dependency-lower-boundsprek hook that fails when a dependency in anypyproject.tomlhas no lower bound. It covers the four tables where the unbounded requirements fixed by hand in #71324 were hiding:project.dependencies,project.optional-dependencies,dependency-groupsandbuild-system.requires.Two kinds of requirement are exempt: uv workspace members, which resolve from the checkout rather than PyPI, and direct URL requirements, where the URL already names the artifact. Without the workspace exemption the hook would report 922 false positives.
Six violations survived those exemptions across all 139 tracked
pyproject.tomlfiles and are fixed here —python-dateutilin the Python client, and the fivepydantic-ai-slimextras incommon.ai, bounded at the>=2.0.0that #71324 already gave the same package in that provider's dev group.uv.lockandproviders/common/ai/docs/index.rstare the regenerated consequences; the lock also picks up four metadata lines from #71324 itself, which merged without a relock.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines