Skip to content

Commit 902119f

Browse files
committed
Bump Python version to 3.13
1 parent c0921e9 commit 902119f

File tree

14 files changed

+74
-10
lines changed

14 files changed

+74
-10
lines changed

.github/workflows/pythonbuild.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set Python versions for run
2828
run: |
2929
if [[ ${{ github.event_name }} == "schedule" ]]; then
30-
echo "python_versions=[\"3.10\",\"3.11\",\"3.12\"]" >> $GITHUB_ENV
30+
echo "python_versions=[\"3.10\",\"3.11\",\"3.12\",\"3.13\"]" >> $GITHUB_ENV
3131
else
3232
echo "python_versions=[\"3.12\"]" >> $GITHUB_ENV
3333
fi
@@ -110,9 +110,9 @@ jobs:
110110
uv pip uninstall --system pandas pyarrow
111111
uv pip freeze
112112
- name: Run extras unit tests with coverage
113-
# Skip this step if running on python 3.12 due to https://github.com/tensorflow/tensorflow/issues/62003
113+
# 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-
if: ${{ matrix.python-version != '3.12' }}
115+
if: ${{ matrix.python-version != '3.12' && matrix.python-version != '3.13' }}
116116
run: |
117117
make unit_test_extras_codecov
118118
- name: Codecov
@@ -139,6 +139,8 @@ jobs:
139139
pandas: "pandas>=2.0.0"
140140
- pandas: "pandas<2.0.0"
141141
python-version: "3.12"
142+
- pandas: "pandas<2.0.0"
143+
python-version: "3.13"
142144

143145
steps:
144146
- uses: actions/checkout@v4
@@ -370,24 +372,39 @@ jobs:
370372
# See: https://github.com/flyteorg/flytekit/actions/runs/4493746408/jobs/7905368664
371373
- python-version: 3.11
372374
plugin-names: "flytekit-whylogs"
373-
# apache-beam, one of flytekit-airflow dependencies, does not support python 3.12: https://github.com/apache/beam/issues/29149
375+
# apache-beam, one of flytekit-airflow dependencies, does not support python 3.12+: https://github.com/apache/beam/issues/29149
374376
- python-version: 3.12
375377
plugin-names: "flytekit-airflow"
378+
- python-version: 3.13
379+
plugin-names: "flytekit-airflow"
376380
# Tensorflow is a dependency of flytekit-mlflow tests and that is not supported yet: https://github.com/tensorflow/tensorflow/issues/62003
377381
- python-version: 3.12
378382
plugin-names: "flytekit-mlflow"
379-
# modin[ray] is a dependency needed to run the tests, unfortunately this is not supported in python 3.12 yet
383+
- python-version: 3.13
384+
plugin-names: "flytekit-mlflow"
385+
# modin[ray] is a dependency needed to run the tests, unfortunately this is not supported in python 3.12+ yet
380386
- python-version: 3.12
381387
plugin-names: "flytekit-modin"
382-
# vaex currently doesn't support python 3.12
388+
- python-version: 3.13
389+
plugin-names: "flytekit-modin"
390+
# vaex currently doesn't support python 3.12+
383391
- python-version: 3.12
384392
plugin-names: "flytekit-vaex"
385-
# Ray does not support python 3.12 yet: https://github.com/ray-project/ray/issues/40211
393+
- python-version: 3.13
394+
plugin-names: "flytekit-vaex"
395+
# Ray does not support python 3.12+ yet: https://github.com/ray-project/ray/issues/40211
386396
- python-version: 3.12
387397
plugin-names: "flytekit-ray"
398+
- python-version: 3.13
399+
plugin-names: "flytekit-ray"
388400
# Segmentation fault on python 3.12: https://github.com/flyteorg/flyte/issues/5020
389401
- python-version: 3.12
390402
plugin-names: "flytekit-kf-pytorch"
403+
- python-version: 3.13
404+
plugin-names: "flytekit-kf-pytorch"
405+
# onnx-pytorch does not support python 3.12+ yet
406+
- python-version: 3.13
407+
plugin-names: "flytekit-onnx-pytorch"
391408
steps:
392409
- uses: actions/checkout@v4
393410
- name: "Clear action cache"

.github/workflows/pythonpublish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
- "3.10"
8383
- "3.11"
8484
- "3.12"
85+
- "3.13"
8586
steps:
8687
- uses: actions/checkout@v4
8788
with:

dev-requirements.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ 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+ yet: https://github.com/tensorflow/tensorflow/issues/62003
2525
tensorflow<=2.15.1; python_version<'3.12'
2626
# Newer versions of torch bring in nvidia dependencies that are not present in windows, so
2727
# we put this constraint while we do not have per-environment requirements files
2828
torch<=1.12.1; python_version<'3.11'
2929
# pytorch 2 supports python 3.11
30-
# pytorch 2 does not support 3.12 yet: https://github.com/pytorch/pytorch/issues/110436
30+
# pytorch 2 does not support 3.12+ yet: https://github.com/pytorch/pytorch/issues/110436
3131
torch; python_version<'3.12'
3232
pydantic
3333

flytekit/configuration/default_images.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ 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)
1617

1718

1819
class DefaultImages(object):
@@ -26,6 +27,7 @@ class DefaultImages(object):
2627
PythonVersion.PYTHON_3_10: "cr.flyte.org/flyteorg/flytekit:py3.10-",
2728
PythonVersion.PYTHON_3_11: "cr.flyte.org/flyteorg/flytekit:py3.11-",
2829
PythonVersion.PYTHON_3_12: "cr.flyte.org/flyteorg/flytekit:py3.12-",
30+
PythonVersion.PYTHON_3_13: "cr.flyte.org/flyteorg/flytekit:py3.13-",
2931
}
3032

3133
@classmethod

plugins/flytekit-openai/flytekitplugins/openai/batch/task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class OpenAIFileDefaultImages(DefaultImages):
6464
PythonVersion.PYTHON_3_10: "cr.flyte.org/flyteorg/flytekit:py3.10-openai-batch-",
6565
PythonVersion.PYTHON_3_11: "cr.flyte.org/flyteorg/flytekit:py3.11-openai-batch-",
6666
PythonVersion.PYTHON_3_12: "cr.flyte.org/flyteorg/flytekit:py3.12-openai-batch-",
67+
PythonVersion.PYTHON_3_13: "cr.flyte.org/flyteorg/flytekit:py3.13-openai-batch-",
6768
}
6869

6970

plugins/flytekit-sqlalchemy/flytekitplugins/sqlalchemy/task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class SQLAlchemyDefaultImages(DefaultImages):
2626
PythonVersion.PYTHON_3_10: "cr.flyte.org/flyteorg/flytekit:py3.10-sqlalchemy-",
2727
PythonVersion.PYTHON_3_11: "cr.flyte.org/flyteorg/flytekit:py3.11-sqlalchemy-",
2828
PythonVersion.PYTHON_3_12: "cr.flyte.org/flyteorg/flytekit:py3.12-sqlalchemy-",
29+
PythonVersion.PYTHON_3_13: "cr.flyte.org/flyteorg/flytekit:py3.13-sqlalchemy-",
2930
}
3031

3132

pyproject.toml

Lines changed: 2 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.10,<3.13"
12+
requires-python = ">=3.10,<3.14"
1313
dependencies = [
1414
# Please maintain an alphabetical order in the following list
1515
"adlfs>=2023.3.0",
@@ -61,6 +61,7 @@ classifiers = [
6161
"Programming Language :: Python :: 3.10",
6262
"Programming Language :: Python :: 3.11",
6363
"Programming Language :: Python :: 3.12",
64+
"Programming Language :: Python :: 3.13",
6465
"Topic :: Scientific/Engineering",
6566
"Topic :: Scientific/Engineering :: Artificial Intelligence",
6667
"Topic :: Software Development",

tests/flytekit/unit/extras/pytorch/test_checkpoint.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import sys
12
from dataclasses import asdict, dataclass
23
from typing import NamedTuple
34

45
import pytest
6+
7+
pytest.importorskip("torch", reason="torch is not available for Python 3.12+")
8+
pytestmark = pytest.mark.skipif(sys.version_info >= (3, 12), reason="torch is not available for Python 3.12+")
9+
510
import torch.nn as nn
611
import torch.nn.functional as F
712
import torch.optim as optim

tests/flytekit/unit/extras/pytorch/test_native.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import sys
2+
3+
import pytest
4+
5+
pytest.importorskip("torch", reason="torch is not available for Python 3.12+")
6+
pytestmark = pytest.mark.skipif(sys.version_info >= (3, 12), reason="torch is not available for Python 3.12+")
7+
18
import torch
29

310
from flytekit import task, workflow

tests/flytekit/unit/extras/pytorch/test_transformations.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import sys
12
from collections import OrderedDict
23
from typing import Union
34

45
import pytest
6+
7+
pytest.importorskip("torch", reason="torch is not available for Python 3.12+")
8+
pytestmark = pytest.mark.skipif(sys.version_info >= (3, 12), reason="torch is not available for Python 3.12+")
9+
510
import torch
611

712
import flytekit

0 commit comments

Comments
 (0)