Skip to content

feat: add python3.14 support, drop python3.9/3.10 support - #75

Merged
aoskotsky-amplify merged 2 commits into
mainfrom
feat-python_3_14_support
Jul 17, 2026
Merged

feat: add python3.14 support, drop python3.9/3.10 support#75
aoskotsky-amplify merged 2 commits into
mainfrom
feat-python_3_14_support

Conversation

@aoskotsky-amplify

@aoskotsky-amplify aoskotsky-amplify commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Add python3.14 support.
  • Drop python3.9/3.10 support (raise the floor to python3.11), following the same bundling pattern as Support python 3.13 #73 (which added 3.13 and dropped 3.8 in one PR).

Why (3.14 support)

Discovered while bumping env_nap_time's Lambda runtime to python3.13/3.14 (its amplify-aws-utils>=0.5,<0.6 install failed under a fresh python3.14 environment): setup.py's get_requirements() and VERSION_FILE opened requirements.txt/version.py via bare relative paths, relying on the build's working directory matching the package root. That held under python3.13's build isolation but breaks under python3.14's -- a newer setuptools resolved into the isolated build environment no longer chdirs the same way, so the read fails with:

FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

Anchored both paths to setup.py's own directory via THIS_DIRECTORY = os.path.abspath(os.path.dirname(__file__)), matching get_long_description(), which already did this correctly. This makes the build independent of the invoking process's cwd regardless of which setuptools version ends up resolved -- not just a python3.14-specific patch.

Why (drop 3.9/3.10)

No compat-shim code in the package depended on <3.11 (checked; none found), so raising the floor is a pure metadata/tooling change with no code impact. Bundled into this PR rather than opening a second one, matching #73's precedent.

Changes

  • setup.py: python_requires >=3.9.0 -> >=3.11.0; classifiers drop 3.9/3.10, add 3.14
  • tox.ini: envlist drops py39/py310, adds py314
  • .github/workflows/test-build-publish.yml: matrix drops 3.9/3.10, adds 3.14
  • .pre-commit-config.yaml: mypy --python-version 3.9 -> 3.11
  • pyproject.toml: ruff target-version py39 -> py311
  • Version bump 0.6.2 -> 0.6.3 (patch, matching Support python 3.13 #73's precedent for a python-version-support bump)

Test plan

  • pip install . succeeds under a real python3.14 interpreter (previously failed with the FileNotFoundError above)
  • Full test suite (58/58) passes under python3.14
  • ruff check / ruff format --check clean under the new target-version
  • Pre-commit hooks (trailing-whitespace, yamllint, mypy w/ --python-version=3.11, etc.) pass on both commits

🤖 Generated with Claude Code

setup.py's get_requirements()/VERSION_FILE opened requirements.txt and
version.py via bare relative paths, relying on the build's working
directory matching the package root. That happened to hold under
python3.13's build isolation but broke under python3.14's (newer
setuptools resolved into the isolated build env no longer chdirs the same
way): FileNotFoundError: requirements.txt, discovered while bumping
env_nap_time's Lambda runtime to 3.13/3.14 and hitting this as a
transitive install failure.

Anchor both paths to setup.py's own directory (matching
get_long_description(), which already did this correctly) so the build
no longer depends on the invoking process's cwd, regardless of which
setuptools version ends up resolved.

Also declares the 3.14 classifier and extends tox/CI to actually test
against it, following the same pattern as #73 (python3.13 support).

Verified: `pip install .` and the full test suite (58/58) pass under a
real python3.14 interpreter -- not just declared support.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aoskotsky-amplify
aoskotsky-amplify marked this pull request as ready for review July 17, 2026 03:41
@aoskotsky-amplify
aoskotsky-amplify requested a review from a team as a code owner July 17, 2026 03:41
Raise the floor to python3.11 -- matching #73's precedent of bundling a
version-support change alongside a drop (that PR added 3.13 and dropped
3.8 in one commit). No compat-shim code depended on <3.11 (checked; none
found), so this is purely a metadata/tooling change:

- setup.py: python_requires >=3.11.0, drop the 3.9/3.10 classifiers
- tox.ini: drop py39/py310 from envlist
- .github/workflows/test-build-publish.yml: drop 3.9/3.10 from the matrix
- .pre-commit-config.yaml: mypy --python-version 3.9 -> 3.11
- pyproject.toml: ruff target-version py39 -> py311

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aoskotsky-amplify aoskotsky-amplify changed the title feat: add python3.14 support feat: add python3.14 support, drop python3.9/3.10 support Jul 17, 2026

@jconstance-amplify jconstance-amplify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

technically 3.10 is still in support for a few more months

@aoskotsky-amplify
aoskotsky-amplify merged commit 9dee551 into main Jul 17, 2026
6 of 7 checks passed
@aoskotsky-amplify
aoskotsky-amplify deleted the feat-python_3_14_support branch July 17, 2026 14:09
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