Skip to content

Require Python 3.11 and drop hatch from the dev extra - #139

Draft
lelia wants to merge 2 commits into
mainfrom
lelia/ce-503-sdk-python-311-floor
Draft

lelia wants to merge 2 commits into
mainfrom
lelia/ce-503-sdk-python-311-floor

Conversation

@lelia

@lelia lelia commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Raises the SDK's Python floor to 3.11 and replaces hatch with build in the dev extra. Together these clear all 40 open Dependabot alerts, which are all for filelock, and remove filelock from the lockfile entirely, so future filelock advisories no longer apply to this repository.

Why

filelock reaches uv.lock only through hatch, by way of virtualenv and python-discovery, in the dev extra. The SDK never imports it, so installs of socketdev were never exposed. Dependabot still could not offer a fix: filelock 4.2.1 and later need Python 3.11, so with a 3.10 floor the newest resolvable version was 3.32.7. filelock is also receiving advisories in batches (40 since October 23), so keeping it in the lockfile means repeated alert churn for a tool contributors seldom use.

Changes

  • requires-python moves from >= 3.10 to >= 3.11, and the 3.10 classifier is removed. Python 3.10 reached end of life in October 2026. Installs on 3.10 keep resolving to 3.6.x.
  • The dev extra replaces hatch and hatchling with build. python -m build calls the same hatchling backend from [build-system] and isolates the build with the standard library venv module rather than virtualenv. CONTRIBUTING.md uses python -m build and asks for Python 3.11 or newer, replacing an outdated 3.9 reference.
  • uv.lock drops filelock, virtualenv, python-discovery, exceptiongroup, and the rest of hatch's tree, going from 68 to 43 packages.
  • Version 3.7.0, with a changelog entry, since dropping a supported Python version is a minor release.

CI is unchanged: the setup-hatch action installs its own pinned hatch with pip and does not use the dev extra.

Notes for review

Validation

  • Unit tests: 204 passed, 1 skipped.
  • python -m build produces the wheel and sdist, and twine check passes on both.
  • uv lock --check passes.
  • Ruff check and format report the same results as main (existing findings that ci: Enforce Ruff lint and formatting #129 fixes). This change adds none.

Refs CE-503

filelock 4.2.1 and later need Python 3.11, so the lockfile could not
take the patched release while the SDK still supported 3.10. Python
3.10 reached end of life in October 2026.

Raise requires-python to 3.11, drop the 3.10 classifier, correct the
contributor setup instructions, and upgrade filelock to 4.3.3. The
lock also drops exceptiongroup, which only 3.10 needed. filelock comes
in through the dev extra alone, so installed packages are unaffected.

Bump the version to 3.7.0, since dropping a Python version is a minor
release.
@lelia
lelia deployed to socket-firewall December 5, 2026 04:29 — with GitHub Actions Active
@lelia

lelia commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor

cursor Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Dropping Python 3.10 is a breaking compatibility change for consumers still on that runtime; runtime SDK behavior is unchanged and filelock affects dev/CI only.

Overview
Release 3.7.0 raises the install floor from Python 3.10 to 3.11: requires-python and Trove classifiers in pyproject.toml, contributor docs, and uv.lock all align on 3.11+. Pip on 3.10 keeps resolving older 3.6.x releases.

The dev lockfile upgrades filelock from 3.32.7 to 4.3.3 (only pulled in via the dev extra), which clears open Dependabot alerts on that dependency. The lock refresh also drops exceptiongroup and Python 3.10–specific resolution markers that are no longer needed.

Reviewed by Cursor Bugbot for commit 3cae5b6. Configure here.

@lelia lelia changed the title Require Python 3.11 and patch filelock in the dev lockfile Require Python >=3.11 and patch filelock in the dev lockfile Dec 5, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3cae5b6. Configure here.

The dev extra installed hatch only so contributors could run
`hatch build`. hatch depends on virtualenv, which brings in filelock and
python-discovery, so every filelock advisory landed on this lockfile even
though the SDK never imports it. CI installs its own hatch through the
setup-hatch action and does not use the extra.

`python -m build` calls the same hatchling backend declared in
build-system and isolates the build with the standard library venv
module, so the dev extra no longer needs virtualenv. hatchling leaves the
extra too, since build tools fetch it from build-system.requires.
@lelia lelia changed the title Require Python >=3.11 and patch filelock in the dev lockfile Require Python 3.11 and drop hatch from the dev extra Dec 5, 2026
@lelia
lelia deployed to socket-firewall December 5, 2026 04:42 — with GitHub Actions Active
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​hatchling@​1.28.0 ⏵ 1.33.096100100100100
Addedpypi/​build@​1.6.197100100100100

View full report

@socket-security-staging

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedhatchling@​1.28.0 ⏵ 1.33.096100100100100
Addedbuild@​1.6.197100100100100

View full report

This branch was successfully deployed

1 active deployment
socket-firewall — c67b49cb Deployed Dec 5, 2026 by lelia via python-sfw-smoke-enterprise #169
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