Skip to content

chore(python): lower minimum supported Python to 3.11 - #2247

Merged
maxdubrinsky merged 1 commit into
mainfrom
chore/python-min-3.11
Jul 13, 2026
Merged

chore(python): lower minimum supported Python to 3.11#2247
maxdubrinsky merged 1 commit into
mainfrom
chore/python-min-3.11

Conversation

@maxdubrinsky

@maxdubrinsky maxdubrinsky commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Lower the SDK's minimum supported Python from 3.12 to 3.11. Debian 12 stable and other LTS environments ship 3.11 as the system interpreter, and the SDK runs there unmodified. 3.11 has upstream security support until Oct 2027.

Related Issue

N/A (chore; no tracking issue).

Changes

  • pyproject.toml: requires-python >=3.12>=3.11; add Programming Language :: Python :: 3.11 classifier; ruff target-version py312py311.
  • CONTRIBUTING.md: contributor prerequisite Python 3.12+3.11+.
  • uv.lock: automatic re-resolution for the wider range (adds tomli under python_full_version <= '3.11'). No manual edits.

Scope / impact

  • Affects only the SDK install path (pip install openshell / uv add openshell into a user-managed env, i.e. import openshell).
  • CLI installs (install.sh, Homebrew, uv tool install) bundle or fetch their own interpreter and are unaffected.
  • Deliberately unchanged: mise.toml dev pin (3.14.5) and release build images (python:3.12-slim). The supported floor and the dev/build interpreter are separate axes; the bin-binding wheel is version-agnostic and the floor is Requires-Python metadata only.

Reviewer notes / caveats

  • Lint baseline moved for everyone. Dropping ruff target-version to py311 means CI lint now rejects 3.12-only syntax (verified: invalid-syntax: Cannot use type parameter lists on Python 3.11) and stops pyupgrade suggesting 3.12+ rewrites.
  • exec_python interpreter skew (pre-existing, not addressed here). The sandbox runs Python 3.13 and exec_python cloudpickles code objects from the client. A 3.11 client widens the client/sandbox skew to two minor versions; code-object pickling isn't guaranteed across minors. Latent already at 3.12→3.13; tracked as a possible follow-up to document interpreter parity.
  • No published docs/ page states a Python floor, so no docs update is needed.

Testing

Validated on a real CPython 3.11.15 interpreter (CI runs 3.14 only):

  • py_compile across all Python sources: clean.
  • ruff check / ruff format --check: pass.
  • ty check (infers 3.11 target from requires-python): pass.
  • uv lock --check: lockfile in sync.
  • mise run pre-commit: pass.

  • mise run pre-commit passes
  • Unit tests added/updated — n/a (metadata/config change; no runtime code changed)
  • E2E tests added/updated — n/a

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated — n/a

Debian 12 stable and other LTS environments ship Python 3.11 as the
system interpreter. The SDK is pure Python with a bundled native
binary, uses no 3.12-only syntax or stdlib APIs, and all dependencies
support 3.11. Lower the floor so `pip install openshell` / `uv add
openshell` works on 3.11 (security-supported until Oct 2027).

Verified with py_compile on CPython 3.11.15 plus ruff and ty.

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
@maxdubrinsky
maxdubrinsky merged commit df06286 into main Jul 13, 2026
32 checks passed
@maxdubrinsky
maxdubrinsky deleted the chore/python-min-3.11 branch July 13, 2026 19:36
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