Skip to content

Commit 263b137

Browse files
Add Python 3.13 and 3.14 support
- Update pyproject.toml to support Python versions up to 3.15 - Add Python 3.13 and 3.14 classifiers - Update GitHub workflows to test on Python 3.13 and 3.14 - Add default images for Python 3.13 and 3.14 - Update dev-requirements.in with TensorFlow and PyTorch support for 3.13+ - Enable extras tests (TensorFlow/PyTorch) for Python 3.13 and 3.14 - Add plugin exclusions for libraries not yet supporting 3.13/3.14 Python 3.13 (released Oct 2024) and Python 3.14 (released Oct 2025) are now fully supported with TensorFlow and PyTorch working on both versions. Only Python 3.12 still has TensorFlow/PyTorch limitations. Signed-off-by: Dor Indivo <[email protected]>
1 parent 330a1e8 commit 263b137

File tree

4 files changed

+44
-8
lines changed

4 files changed

+44
-8
lines changed

.github/workflows/pythonbuild.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
- name: Set Python versions for run
2828
run: |
2929
if [[ ${{ github.event_name }} == "schedule" ]]; then
30-
echo "python_versions=[\"3.9\",\"3.10\",\"3.11\",\"3.12\"]" >> $GITHUB_ENV
30+
echo "python_versions=[\"3.9\",\"3.10\",\"3.11\",\"3.12\",\"3.13\",\"3.14\"]" >> $GITHUB_ENV
3131
else
32-
echo "python_versions=[\"3.9\", \"3.12\"]" >> $GITHUB_ENV
32+
echo "python_versions=[\"3.9\", \"3.12\", \"3.13\", \"3.14\"]" >> $GITHUB_ENV
3333
fi
3434
3535
build:
@@ -112,6 +112,7 @@ jobs:
112112
- name: Run extras unit tests with coverage
113113
# Skip this step if running on python 3.12 due to https://github.com/tensorflow/tensorflow/issues/62003
114114
# and https://github.com/pytorch/pytorch/issues/110436
115+
# TensorFlow now supports 3.13, PyTorch supports 3.13 and 3.14
115116
if: ${{ matrix.python-version != '3.12' }}
116117
run: |
117118
make unit_test_extras_codecov
@@ -390,6 +391,32 @@ jobs:
390391
# Segmentation fault on python 3.12: https://github.com/flyteorg/flyte/issues/5020
391392
- python-version: 3.12
392393
plugin-names: "flytekit-kf-pytorch"
394+
# Python 3.13 - exclude plugins that don't support it yet
395+
# apache-beam does not support python 3.13 yet
396+
- python-version: 3.13
397+
plugin-names: "flytekit-airflow"
398+
# modin[ray] is not supported on python 3.13 yet
399+
- python-version: 3.13
400+
plugin-names: "flytekit-modin"
401+
# vaex does not support python 3.13
402+
- python-version: 3.13
403+
plugin-names: "flytekit-vaex"
404+
# Ray does not support python 3.13 yet
405+
- python-version: 3.13
406+
plugin-names: "flytekit-ray"
407+
# Python 3.14 - exclude plugins that don't support it yet
408+
# apache-beam does not support python 3.14 yet
409+
- python-version: 3.14
410+
plugin-names: "flytekit-airflow"
411+
# modin[ray] is not supported on python 3.14 yet
412+
- python-version: 3.14
413+
plugin-names: "flytekit-modin"
414+
# vaex does not support python 3.14
415+
- python-version: 3.14
416+
plugin-names: "flytekit-vaex"
417+
# Ray does not support python 3.14 yet
418+
- python-version: 3.14
419+
plugin-names: "flytekit-ray"
393420
steps:
394421
- uses: actions/checkout@v4
395422
- name: "Clear action cache"
@@ -441,10 +468,10 @@ jobs:
441468
steps:
442469
- name: Fetch the code
443470
uses: actions/checkout@v4
444-
- name: Set up Python 3.12
471+
- name: Set up Python 3.14
445472
uses: actions/setup-python@v4
446473
with:
447-
python-version: 3.12
474+
python-version: 3.14
448475
- uses: actions/cache@v4
449476
with:
450477
path: ~/.cache/pip

dev-requirements.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ keyrings.alt
2121
setuptools_scm
2222
pytest-icdiff
2323

24-
# Tensorflow is not available for python 3.12 yet: https://github.com/tensorflow/tensorflow/issues/62003
24+
# Tensorflow is not available for python 3.12: https://github.com/tensorflow/tensorflow/issues/62003
25+
# TensorFlow now supports 3.13+
2526
tensorflow<=2.15.1; python_version<'3.12'
27+
tensorflow; python_version>='3.13'
2628
# Newer versions of torch bring in nvidia dependencies that are not present in windows, so
2729
# we put this constraint while we do not have per-environment requirements files
2830
torch<=1.12.1; python_version<'3.11'
2931
# pytorch 2 supports python 3.11
30-
# pytorch 2 does not support 3.12 yet: https://github.com/pytorch/pytorch/issues/110436
31-
torch; python_version<'3.12'
32+
# pytorch does not support 3.12 yet: https://github.com/pytorch/pytorch/issues/110436
33+
# pytorch now supports 3.13 and 3.14
34+
torch; python_version=='3.11' or python_version>='3.13'
3235
pydantic
3336

3437
# TODO: Currently, the python-magic library causes build errors on Windows due to its dependency on DLLs for libmagic.

flytekit/configuration/default_images.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class PythonVersion(enum.Enum):
1313
PYTHON_3_10 = (3, 10)
1414
PYTHON_3_11 = (3, 11)
1515
PYTHON_3_12 = (3, 12)
16+
PYTHON_3_13 = (3, 13)
17+
PYTHON_3_14 = (3, 14)
1618

1719

1820
class DefaultImages(object):
@@ -26,6 +28,8 @@ class DefaultImages(object):
2628
PythonVersion.PYTHON_3_10: "cr.flyte.org/flyteorg/flytekit:py3.10-",
2729
PythonVersion.PYTHON_3_11: "cr.flyte.org/flyteorg/flytekit:py3.11-",
2830
PythonVersion.PYTHON_3_12: "cr.flyte.org/flyteorg/flytekit:py3.12-",
31+
PythonVersion.PYTHON_3_13: "cr.flyte.org/flyteorg/flytekit:py3.13-",
32+
PythonVersion.PYTHON_3_14: "cr.flyte.org/flyteorg/flytekit:py3.14-",
2933
}
3034

3135
@classmethod

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [{ name = "Flyte Contributors", email = "[email protected]" }]
99
description = "Flyte SDK for Python"
1010
license = { text = "Apache-2.0" }
1111
readme = { file = "README.md", content-type = "text/markdown" }
12-
requires-python = ">=3.9,<3.13"
12+
requires-python = ">=3.9,<3.15"
1313
dependencies = [
1414
# Please maintain an alphabetical order in the following list
1515
"adlfs>=2023.3.0",
@@ -60,6 +60,8 @@ classifiers = [
6060
"Programming Language :: Python :: 3.10",
6161
"Programming Language :: Python :: 3.11",
6262
"Programming Language :: Python :: 3.12",
63+
"Programming Language :: Python :: 3.13",
64+
"Programming Language :: Python :: 3.14",
6365
"Topic :: Scientific/Engineering",
6466
"Topic :: Scientific/Engineering :: Artificial Intelligence",
6567
"Topic :: Software Development",

0 commit comments

Comments
 (0)