Skip to content

Raise the Python floor to 3.11.5 so soupsieve 4 can be locked - #674

Open
dyve wants to merge 1 commit into
mainfrom
raise-python-floor-to-3-11-5
Open

dyve wants to merge 1 commit into
mainfrom
raise-python-floor-to-3-11-5

Conversation

@dyve

@dyve dyve commented Dec 3, 2026

Copy link
Copy Markdown
Member

Propagated from zostera/django-marina#704, which carries the full reasoning.

The problem

soupsieve 4 requires Python >= 3.11.5. With requires-python = ">=3.11", uv cannot pick one soupsieve for the whole supported range, so it forks the resolution — soupsieve 4.x from 3.11.5 up, a vulnerable 2.x below it. The advisories name the 2.x, so they cannot close no matter how the lock is regenerated.

The fix

Raise the floor to 3.11.5. The fork disappears:

beautifulsoup4   4.15.0     (all pythons)
soupsieve        4.1.4      (all pythons)

Why not the alternative

The other way out is the one the resolver prefers when the floor stays at 3.11, and the one Dependabot's own PR takes here: keep soupsieve 4 and drop beautifulsoup4 back to 4.6.3 instead — a release from 2018, predating soupsieve entirely. Verified by installing that lock on Python 3.11.4.

That silences the alerts while pinning an eight-year-old HTML parser. Quieter dashboard, worse software. This PR supersedes the Dependabot lock PR in this repository, and does strictly more than it.

Why the cost is acceptable

  • Python 3.11.0–3.11.4 are from October 2022 to April 2023. 3.11.18 is current.
  • CI has only ever run the newest 3.11 — uv python install 3.11 resolves to the latest patch. Those four releases were never tested here. A floor we do not test is a promise we cannot keep.
  • The Python :: 3.11 classifier stays correct: the cycle is still supported, from .5 up. tox.ini's py311 and the ci.yml matrix entry are unchanged and still resolve to the newest patch.

Recorded as breaking in the changelog — under YY.N the version number carries no such signal, so the note is the only warning anyone pinned below 3.11.5 gets.

MAINTAINING.md gains the general rule, verbatim from marina, since the next dependency to do this will not be soupsieve.

Verification

just lint, just test-cov (100%) and just docs all pass locally.

🤖 Generated with Claude Code

Propagated from zostera/django-marina#704.

soupsieve 4, which carries the fixes for four denial-of-service
advisories, requires Python 3.11.5. `requires-python` was ">=3.11", so
uv could not pick one soupsieve for the whole supported range and
forked: 4.x from 3.11.5 up, a vulnerable 2.x below it. The advisories
name the 2.x, so they could not close.

Raising the floor to 3.11.5 removes the fork. soupsieve is now 4.1.4 and
beautifulsoup4 4.15.0 on every supported interpreter.

The alternative the resolver reaches for, and what Dependabot's own pull
requests do, is to drop beautifulsoup4 back to 4.6.3 on the old patches
instead. That quiets the alerts while pinning a parser from 2018, which
is worse than the problem.

3.11.0 through 3.11.4 are from 2022 and 2023; 3.11.18 is current. CI has
only ever run the newest 3.11, so those four were never tested here. A
floor we do not test is a promise we cannot keep.

Recorded as breaking, and MAINTAINING.md now says a floor may be a patch
version and why.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — raise-python-floor-to-3-11-5 into main

This branch has not been deployed

No deployments
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.

2 participants