Open
Conversation
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.
Tracking issue
Closes flyteorg/flyte#6993
Why are the changes needed?
Python 3.13 was released in October 2024, and flytekit should support it. The previous
requires-pythonconstraint was>=3.10,<3.13, which explicitly excluded Python 3.13. Several issues needed to be addressed:requires-pythonconstraint needed to be updated from>=3.10,<3.13to>=3.10,<3.14to allow Python 3.13pyproject.tomlPythonVersionenum didn't include Python 3.13, causingValueError: (3, 13) is not a valid PythonVersionerrors when running testsWhat changes were proposed in this pull request?
Core Changes
pyproject.toml:
requires-pythonfrom">=3.10,<3.13"to">=3.10,<3.14"to allow Python 3.13"Programming Language :: Python :: 3.13"to project classifiersflytekit/configuration/default_images.py:
PYTHON_3_13 = (3, 13)toPythonVersionenum"cr.flyte.org/flyteorg/flytekit:py3.13-"Plugin Updates
SQLAlchemyDefaultImages._DEFAULT_IMAGE_PREFIXESOpenAIBatchDefaultImages._DEFAULT_IMAGE_PREFIXESTest Updates
Added
pytest.importorskip()andpytestmark = pytest.mark.skipif(sys.version_info >= (3, 12), ...)to skip tensorflow/pytorch tests on Python 3.12+:tests/flytekit/unit/extras/pytorch/test_checkpoint.pytests/flytekit/unit/extras/pytorch/test_native.pytests/flytekit/unit/extras/pytorch/test_transformations.pytests/flytekit/unit/extras/tensorflow/record/test_transformations.pytests/flytekit/unit/extras/tensorflow/record/test_record.pytests/flytekit/unit/extras/tensorflow/model/test_model.pytests/flytekit/unit/extras/tensorflow/model/test_transformations.pyThese tests are automatically skipped on Python 3.12+ because tensorflow and pytorch don't support these Python versions yet.
CI/CD Updates
.github/workflows/pythonbuild.yml:
["3.10","3.11","3.12","3.13"]if: ${{ matrix.python-version != '3.12' && matrix.python-version != '3.13' }}.github/workflows/pythonpublish.yml:
["3.10","3.11","3.12","3.13"].github/workflows/build_image.yml:
Documentation
How was this patch tested?
Setup process
Created a Python 3.13 uv environment:
Installed dependencies and dev requirements:
uv pip install -r dev-requirements.in
Ran unit tests using make commands:
Verified tensorflow/pytorch tests are properly skipped:
Test Results
(3, 13)Screenshots
N/A (code changes only)
Check all the applicable boxes
Related PRs
N/A
Docs link
N/A (no documentation changes required)
Note: Some plugins are excluded from Python 3.13 CI runs due to dependency incompatibilities (documented in workflow exclusions). These will be re-enabled as dependencies add Python 3.13 support.