Skip to content

feat(sdk): accept python 3.13 as a target version#338

Open
deanq wants to merge 5 commits into
mainfrom
deanq/ae-3152-python313-sdk
Open

feat(sdk): accept python 3.13 as a target version#338
deanq wants to merge 5 commits into
mainfrom
deanq/ae-3152-python313-sdk

Conversation

@deanq
Copy link
Copy Markdown
Member

@deanq deanq commented May 22, 2026

Summary

Adds Python 3.13 to the SDK's supported target versions. Strictly additive — non-breaking. Users opt in by declaring python_version="3.13" on a resource; default deploy behavior is unchanged.

What's in this PR

  • core/resources/constants.py: add "3.13" to SUPPORTED_PYTHON_VERSIONS, GPU_PYTHON_VERSIONS, CPU_PYTHON_VERSIONS. DEFAULT_PYTHON_VERSION, WORKER_PYTHON_VERSION, and GPU_BASE_IMAGE_PYTHON_VERSION remain "3.12".
  • pyproject.toml: requires-python = ">=3.10,<3.14". Add Programming Language :: Python :: 3.13 (and 3.12) classifier.
  • Tests: assert validate_python_version("3.13") succeeds, _reconcile_python_version accepts a python_version="3.13" resource declaration, image-name resolution for 3.13 yields runpod/flash:py3.13-latest. The previously-existing "invalid version" sentinel tests were flipped from "3.13" to "3.9".
  • CI: python-version matrix in ci.yml and release-please.yml extended to include 3.13.

Why

Extracted from AE-2827 / #330 so 3.13 support can land independently of the broader match-local-by-default work (which is a BREAKING CHANGE and still in flight on #330). This PR has no breaking changes.

Pairs with flash-worker #98 which publishes the py3.13-* Docker image variants.

Release coordination

Both PRs can merge to main in any order. The only ordering constraint is between the release-please PRs:

  1. flash-worker release-please merges first → Docker Hub publishes runpod/flash:py3.13-{gpu,cpu,lb,lb-cpu}.
  2. flash release-please merges → PyPI publishes new SDK that accepts python_version="3.13".

If the SDK release lands first, no user can hit a broken state until they explicitly set python_version="3.13", which would then pull a missing image tag. Reversing the release order eliminates that window.

Linear

AE-3152 (child of AE-2827)

Test plan

  • CI green on 3.10/3.11/3.12/3.13
  • validate_python_version("3.13") returns "3.13"
  • _reconcile_python_version accepts python_version="3.13" on a resource
  • After flash-worker py3.13 release → manual end-to-end deploy of a LiveServerless(python_version="3.13", ...) succeeds and handler returns a response

deanq added 4 commits May 22, 2026 11:28
Extend GPU_PYTHON_VERSIONS, CPU_PYTHON_VERSIONS, and SUPPORTED_PYTHON_VERSIONS
to include "3.13". DEFAULT_PYTHON_VERSION, WORKER_PYTHON_VERSION, and
GPU_BASE_IMAGE_PYTHON_VERSION remain "3.12". Update tests to assert 3.13 is
valid and use "3.9" as the invalid-version sentinel.
Direct test that a single resource declaring python_version="3.13" reconciles
to "3.13" without raising.
Bump upper bound from <3.13 to <3.14 and add Python 3.13 PyPI classifier.
Expand the quality-gates matrix in both ci.yml and release-please.yml to
include '3.13'. Single-version setup-python lines are left unchanged.
@promptless
Copy link
Copy Markdown

promptless Bot commented May 22, 2026

Promptless prepared a documentation update related to this change.

Triggered by PR #338

Updated 6 documentation files to reflect Python 3.13 support in the Flash SDK, replacing "coming soon" notices with actual support documentation.

Review: Flash Python 3.13 support

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Python 3.13 as an opt-in target/runtime version for the Flash SDK, updating version validation, image-name resolution, packaging metadata, CI matrices, and accompanying unit tests. Default behavior remains pinned to Python 3.12.

Changes:

  • Extend supported/CPU/GPU Python version constants to include "3.13" and validate "3.13" for image name resolution.
  • Broaden packaging metadata (requires-python) and update GitHub Actions matrices to test on Python 3.13.
  • Update unit tests to cover "3.13" acceptance and shift “invalid version” sentinels away from "3.13".

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/runpod_flash/core/resources/constants.py Adds 3.13 to supported/CPU/GPU version lists used for validation and image resolution.
pyproject.toml Expands requires-python to <3.14 and adds Python 3.12/3.13 classifiers.
tests/unit/core/resources/test_constants.py Updates constants/image/version-validation tests to include 3.13 and adjusts invalid-version cases.
tests/unit/cli/commands/build_utils/test_manifest.py Adds a unit test ensuring _reconcile_python_version accepts a 3.13 resource declaration.
tests/unit/resources/test_serverless.py Updates invalid-version test sentinel away from 3.13.
.github/workflows/ci.yml Extends CI test matrix to include Python 3.13.
.github/workflows/release-please.yml Extends release workflow quality gate matrix to include Python 3.13.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/unit/resources/test_serverless.py Outdated
Comment thread tests/unit/core/resources/test_constants.py Outdated
Comment thread pyproject.toml
- Add Python 3.10/3.11 classifiers (we still support them per requires-python)
- Use distinct invalid sentinels: "3.99" for the "unknown version" tests,
  keep "3.9" for the explicit "too-old" tests
@deanq deanq requested review from KAJdev, jhcipar and runpod-Henrik May 23, 2026 19:53
@deanq deanq changed the title feat(sdk): accept python 3.13 as a target version (AE-3152) feat(sdk): accept python 3.13 as a target version May 23, 2026
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.

3 participants