Skip to content

Lower examples/tools requires-python to unblock Dependabot - #139

Open
stevewithey wants to merge 1 commit into
mainfrom
fix/dependabot-python-floor
Open

stevewithey wants to merge 1 commit into
mainfrom
fix/dependabot-python-floor

Conversation

@stevewithey

Copy link
Copy Markdown

Why

Every Dependabot uv security update in this repo is failing, including urllib3 → 2.8.0 for alert #28 (high). The error is:

Python version incompatibility: The Python request from .python-version resolved to Python 3.10.22, which is incompatible with the project's Python requirement: >=3.13, <4.0 (from workspace member tools's project.requires-python).

Dependabot's uv updater doesn't read our .python-version (3.13). It takes the root requires-python (>=3.9) and picks the lowest Python it has installed, which is 3.10.22. It then runs pyenv local 3.10.22 and uv lock. The examples/tools workspace member requires >=3.13, so the lock can never resolve. uv python pin can't fix this because Dependabot overwrites the pin.

What

  • examples/tools/pyproject.toml: requires-python changes from >=3.13 to >=3.10. The example uses no 3.11+ features.
  • uv.lock: relocked. The lock now targets >=3.10, matching what Dependabot runs. The only additions are the 3.10 backports pytest needs (exceptiongroup, tomli) and the cp310–312 wheels. No pinned versions change.

Verification

  • I reproduced Dependabot's steps locally: pinned 3.10, then ran uv lock --upgrade-package urllib3==2.8.0. It now succeeds.
  • On 3.12 (the CI version), ruff format --check, ruff check and pytest all pass (28 tests).

Once this merges, Dependabot should open the urllib3 PR itself.

Not in scope

  • tests/test_webhook.py uses datetime.UTC, which needs Python 3.11+. The test suite fails on 3.10 before and after this change. CI uses 3.12, so this isn't a blocker.
  • The root package still declares >=3.9, but pytest>=9.0.3 and requests>=2.33.0 already need 3.10+. Worth bumping the published floor to >=3.10 separately.

🤖 Generated with Claude Code

Dependabot's uv updater ignores .python-version: it picks the lowest
Python satisfying the root requires-python (>=3.9 -> 3.10.22 on its
image), runs `pyenv local 3.10.22`, then `uv lock`. The workspace
member examples/tools required >=3.13, so every uv security update
failed with "Python version incompatibility" (e.g. urllib3 2.8.0,
Dependabot alert #28).

The example uses no 3.11+ features, so lower its floor to >=3.10. The
workspace lock now targets >=3.10, matching what Dependabot runs.
Relocking only adds the 3.10 backports pytest needs (exceptiongroup,
tomli) plus cp310-312 wheels; no pinned versions change.

Verified locally by reproducing Dependabot's steps: with 3.10 pinned,
`uv lock --upgrade-package urllib3==2.8.0` now succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stevewithey
stevewithey marked this pull request as ready for review November 13, 2026 15:44
@stevewithey
stevewithey enabled auto-merge (squash) November 13, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant