Skip to content

Add support for Python 3.14#2163

Merged
jonathan343 merged 4 commits intoaws:masterfrom
jonathan343:add-python-3.14
May 5, 2026
Merged

Add support for Python 3.14#2163
jonathan343 merged 4 commits intoaws:masterfrom
jonathan343:add-python-3.14

Conversation

@jonathan343
Copy link
Copy Markdown
Collaborator

@jonathan343 jonathan343 commented May 2, 2026

Note

This PR builds on top of #2162 and should be merged subsequently. After merging, this PR will rebased and will result in a smaller reviewable diff.

Addresses #2150 , #2153, and #2167

Summary

This PR adds support for Python 3.14 by updating compatibility checks, runtime mappings, development dependencies, the v2 pipeline CodeBuild image, and tests.

It also includes a packager change so chalice can fetch wheels built for newer manylinux profiles. Pip treats --platform as a literal tag and won't extrapolate to lower manylinux_X_Y versions, so chalice now emits when downloading manylinux wheels. Without this, Python 3.14 wheels of pandas/numpy/scipy (which only ship as manylinux_2_24+) can't be packaged.

Testing

I deployed a modified version of the sample Lambda handler that prints the python version. The steps to reproduce are provided below:

  1. Create and activate a Python 3.14 virtual environment
$ uv venv -p 3.14
$ source .venv/bin/activate
  1. Install Chalice
$ uv pip install -e .
  1. Create a test application and cd into the project dir
$ chalice new-project helloworld
$ cd helloworld
  1. Modify the generated app.py file to print the python version:
import platform
from chalice import Chalice

app = Chalice(app_name='helloworld')


@app.route('/')
def index():
    return {
        'hello': 'world',
        'python_version': platform.python_version()
    }
  1. Deploy the test app
$ chalice deploy
  1. Validate the test app was deployed successfully
$ curl <rest_api_url>
{"hello":"world","python_version":"3.14.3"}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jonathan343 jonathan343 mentioned this pull request May 2, 2026
1 task
- Map python3.14 to cp314 with AL2023 glibc (2.34) in the packager,
  add it to runtime classifiers, docs, CI, and test gates
- Replace removed ast.Str usage in the static analyzer with ast.Constant
- Bump the v2 pipeline CodeBuild image to amazonlinux2023-x86_64-standard:5.0
  so the runtime is available
- Update pip to the latest version (<26.2)
- Expand the pip --platform list emitted when downloading manylinux
  wheels so newer manylinux_2_X profiles are accepted; pip treats
  --platform as a literal tag and won't extrapolate, so we enumerate
  every glibc minor up to the runtime's. Required for Python 3.14
  wheels of pandas/numpy/scipy, which only ship as manylinux_2_24+
- Bump pandas/numpy versions in the packaging integration test to
  ones that publish cp314 wheels
@jonathan343 jonathan343 merged commit bf4dce6 into aws:master May 5, 2026
15 checks passed
@jonathan343 jonathan343 deleted the add-python-3.14 branch May 5, 2026 20:49
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