chore(python): lower minimum supported Python to 3.11 - #2247
Merged
Conversation
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
requested review from
a team,
derekwaynecarr,
maxamillion and
mrunalp
as code owners
July 13, 2026 18:19
drew
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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; addProgramming Language :: Python :: 3.11classifier; rufftarget-versionpy312→py311.CONTRIBUTING.md: contributor prerequisitePython 3.12+→3.11+.uv.lock: automatic re-resolution for the wider range (addstomliunderpython_full_version <= '3.11'). No manual edits.Scope / impact
pip install openshell/uv add openshellinto a user-managed env, i.e.import openshell).install.sh, Homebrew,uv tool install) bundle or fetch their own interpreter and are unaffected.mise.tomldev 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 isRequires-Pythonmetadata only.Reviewer notes / caveats
target-versiontopy311means 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_pythoninterpreter skew (pre-existing, not addressed here). The sandbox runs Python 3.13 andexec_pythoncloudpickles 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.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_compileacross all Python sources: clean.ruff check/ruff format --check: pass.ty check(infers 3.11 target fromrequires-python): pass.uv lock --check: lockfile in sync.mise run pre-commit: pass.mise run pre-commitpassesChecklist