Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.13 in templates, CI, and codebase #1364

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RemyTinco
Copy link

@RemyTinco RemyTinco commented Mar 8, 2025

Description

This PR adds support for Python 3.13 in Zappa, enabling deployments on AWS Lambda with the latest Python runtime.

The following updates have been made:

  • Updated SUPPORTED_VERSIONS in zappa/__init__.py to include Python 3.13.
  • Added Python 3.13 to get_runtime_from_python_version() in zappa/utilities.py.
  • Updated the GitHub CI pipeline (.github/workflows/ci.yml) to test against Python 3.13.
  • Modified setup.py classifiers to reflect Python 3.13 support.
  • Updated README.md and issue templates to mention Python 3.13 compatibility.
  • Added a test case in tests/tests.py for verifying Python 3.13 runtime compatibility.

Testing

This PR was tested by:
🟧 Running CI tests across supported Python versions (3.8 – 3.13).
🟥 Deploying a test Zappa application with Python 3.13 to AWS Lambda.
🟩 : Running unit tests to verify manylinux wheel compatibility with Python 3.13.

GitHub Issue Reference

Closes #1363

@@ -986,7 +986,7 @@ to change Zappa's behavior. Use these at your own risk!
"role_name": "MyLambdaRole", // Name of Zappa execution role. Default <project_name>-<env>-ZappaExecutionRole. To use a different, pre-existing policy, you must also set manage_roles to false.
"role_arn": "arn:aws:iam::12345:role/app-ZappaLambdaExecutionRole", // ARN of Zappa execution role. Default to None. To use a different, pre-existing policy, you must also set manage_roles to false. This overrides role_name. Use with temporary credentials via GetFederationToken.
"route53_enabled": true, // Have Zappa update your Route53 Hosted Zones when certifying with a custom domain. Default true.
"runtime": "python3.12", // Python runtime to use on Lambda. Can be one of: "python3.8", "python3.9", "python3.10", "python3.11", or "python3.12". Defaults to whatever the current Python being used is.
"runtime": "python3.12", // Python runtime to use on Lambda. Can be one of: "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", or "python3.13". Defaults to whatever the current Python being used is.

Choose a reason for hiding this comment

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

Might be worth changing the sample value here to "python3.13", to keep it at the latest?

Suggested change
"runtime": "python3.12", // Python runtime to use on Lambda. Can be one of: "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", or "python3.13". Defaults to whatever the current Python being used is.
"runtime": "python3.13", // Python runtime to use on Lambda. Can be one of: "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", or "python3.13". Defaults to whatever the current Python being used is.

@monkut
Copy link
Collaborator

monkut commented Mar 18, 2025

You need to install pre-commit:

pre-commit install

And then re-commit. It's failing on the linter.

@bheemaguli
Copy link

Linting fixed here @RemyTinco

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.

Add Python 3.13 Support
4 participants