Skip to content

Commit 2c4746d

Browse files
authored
Patch dependency CVEs, drop Python 3.9, add Python 3.10–3.14 support (#608)
* Bump aiohttp, requests, pytest to patch dependabot CVEs * Bump Python minimum to 3.10, test and add support for 3.14 * Bump test deps for 3.14 compatibility * Bump pytest-asyncio to cleanup 3.14 test warnings
1 parent 4e11018 commit 2c4746d

9 files changed

Lines changed: 76 additions & 45 deletions

File tree

.github/workflows/durable_python_action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v1
15-
- name: Set up Python 3.9.x
15+
- name: Set up Python 3.10.x
1616
uses: actions/setup-python@v1
1717
with:
18-
python-version: 3.9.x
18+
python-version: 3.10.x
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip

.github/workflows/validate.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,24 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
include:
20-
# Fallback path: on Python 3.9 the SDK's df_dumps / df_loads cannot
21-
# be installed (azure-functions 2.x requires >=3.13 and the 1.26.0
22-
# line requires >=3.10), so this leg exercises the legacy
23-
# serialization fallback in df_serialization.
24-
- python-version: "3.9"
20+
# Floor version. Pin an older azure-functions (< 1.26.0) that
21+
# predates the centralized df_dumps / df_loads serializers so this
22+
# leg exercises the legacy serialization fallback in
23+
# df_serialization.
24+
- python-version: "3.10"
25+
functions-sdk: "azure-functions<1.26.0"
26+
- python-version: "3.11"
27+
functions-sdk: ""
28+
- python-version: "3.12"
2529
functions-sdk: ""
2630
# SDK path: Python 3.13 with the beta that first ships df_dumps /
2731
# df_loads, exercising the SDK-delegated serialization branch.
2832
# TODO: change to "azure-functions>=2.2.0" once 2.2.0 GA ships, and
2933
# drop the explicit override step below.
3034
- python-version: "3.13"
3135
functions-sdk: "azure-functions>=2.2.0b5"
36+
- python-version: "3.14"
37+
functions-sdk: ""
3238
steps:
3339
- name: Checkout repository
3440
uses: actions/checkout@v2
@@ -41,16 +47,16 @@ jobs:
4147
run: |
4248
python -m pip install --upgrade pip
4349
pip install -r requirements.txt
44-
- name: Install Functions SDK override
50+
- name: Pin azure-functions version
4551
if: matrix.functions-sdk != ''
4652
run: pip install "${{ matrix.functions-sdk }}"
4753
- name: Run Linter
4854
# Lint only on the canonical Python version. On Python 3.12+, PEP 701
4955
# changed f-string tokenization so pycodestyle inspects tokens inside
5056
# f-strings, producing false positives (e.g. the ':' in 'http://' or
5157
# the indentation of multi-line f-string concatenations). Linting is
52-
# environment-agnostic, so running it once on 3.9 is sufficient.
53-
if: matrix.python-version == '3.9'
58+
# environment-agnostic, so running it once on 3.10 is sufficient.
59+
if: matrix.python-version == '3.10'
5460
run: |
5561
cd azure
5662
flake8 . --count --show-source --statistics
@@ -73,7 +79,7 @@ jobs:
7379
- name: Set up Python
7480
uses: actions/setup-python@v2
7581
with:
76-
python-version: 3.9
82+
python-version: "3.10"
7783
- name: Install dependencies
7884
run: |
7985
python -m pip install --upgrade pip

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Thank you for taking the time to contribute to Durable Functions in [Python](htt
2424
- MacOS (or) Windows10 Ubuntu WSL
2525
- Language Runtimes
2626
- .NET Core 2.0
27-
- \>= Python 3.9.x
27+
- \>= Python 3.10.x
2828

2929
Note: Some ML libraries may not be compatible with newer Python versions. Make sure the library is compatible with the Python version.
3030

azure-pipelines-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- task: UsePythonVersion@0
1919
inputs:
20-
versionSpec: '3.9'
20+
versionSpec: '3.10'
2121
- download: DurablePyCI
2222
- script: "rm -r ./azure_functions_durable/_manifest"
2323
displayName: 'Remove _manifest folder'

azure-pipelines.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trigger:
1313
- v*
1414

1515
variables:
16-
python.version: '3.9'
16+
python.version: '3.10'
1717
baseFolder: .
1818
componentArtifactName: 'azure_functions_durable'
1919
#componentArtifactName: 'dist'
@@ -38,6 +38,11 @@ stages:
3838
python -m pip install --upgrade pip
3939
pip install -r requirements.txt
4040
pip install wheel
41+
# Pin an older azure-functions (< 1.26.0) that predates the
42+
# centralized df_dumps / df_loads serializers so this job exercises
43+
# the legacy serialization fallback in df_serialization. The
44+
# Test_Functions_Sdk_Path job covers the SDK-delegated branch.
45+
pip install "azure-functions<1.26.0"
4146
workingDirectory: $(baseFolder)
4247
displayName: 'Install dependencies'
4348
@@ -68,11 +73,11 @@ stages:
6873

6974
- job: Test_Functions_Sdk_Path
7075
displayName: Test SDK Serialization Path (Py 3.13)
71-
# The Build_Durable_Functions job runs on Python 3.9, where the SDK's
72-
# df_dumps / df_loads cannot be installed (azure-functions 2.x requires
73-
# >=3.13), so it only exercises the legacy serialization fallback. This
74-
# job runs on Python 3.13 with the beta that first ships df_dumps /
75-
# df_loads to cover the SDK-delegated branch in df_serialization.
76+
# The Build_Durable_Functions job runs on Python 3.10 with an older
77+
# azure-functions (< 1.26.0) pinned, so it only exercises the legacy
78+
# serialization fallback. This job runs on Python 3.13 with the beta
79+
# that first ships df_dumps / df_loads to cover the SDK-delegated branch
80+
# in df_serialization.
7681
# TODO: change the override to 'azure-functions>=2.2.0' once 2.2.0 GA
7782
# ships, and drop the explicit install step.
7883
pool:

eng/templates/build.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ jobs:
1212
steps:
1313
- task: UsePythonVersion@0
1414
inputs:
15-
versionSpec: '3.9.x'
15+
versionSpec: '3.10.x'
1616
- script: |
1717
python -m pip install --upgrade pip
1818
pip install -r requirements.txt
1919
pip install wheel
20+
# Pin an older azure-functions (< 1.26.0) that predates the
21+
# centralized df_dumps / df_loads serializers so this job
22+
# exercises the legacy serialization fallback in df_serialization.
23+
# The Test_Functions_Sdk_Path job covers the SDK-delegated branch.
24+
pip install "azure-functions<1.26.0"
2025
workingDirectory: $(System.DefaultWorkingDirectory)
2126
displayName: 'Install dependencies'
2227
@@ -44,11 +49,11 @@ jobs:
4449
- job: Test_Functions_Sdk_Path
4550
displayName: Test SDK Serialization Path (Py 3.13)
4651

47-
# The Build job runs on Python 3.9, where the SDK's df_dumps / df_loads
48-
# cannot be installed (azure-functions 2.x requires >=3.13), so it only
49-
# exercises the legacy serialization fallback. This job runs on Python
50-
# 3.13 with the beta that first ships df_dumps / df_loads to cover the
51-
# SDK-delegated branch in df_serialization.
52+
# The Build job runs on Python 3.10 with an older azure-functions
53+
# (< 1.26.0) pinned, so it only exercises the legacy serialization
54+
# fallback. This job runs on Python 3.13 with the beta that first ships
55+
# df_dumps / df_loads to cover the SDK-delegated branch in
56+
# df_serialization.
5257
# TODO: change the override to 'azure-functions>=2.2.0' once 2.2.0 GA
5358
# ships, and drop the explicit install step.
5459
steps:
@@ -64,4 +69,4 @@ jobs:
6469
- script: |
6570
pip install pytest pytest-azurepipelines
6671
pytest --ignore=samples-v2
67-
displayName: 'pytest'
72+
displayName: 'pytest'

noxfile.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
import nox
22

3-
@nox.session(python=["3.9","3.11"])
3+
# Mirror the supported range exercised by CI (.github/workflows/validate.yml).
4+
# nox automatically skips interpreters that aren't installed locally.
5+
SUPPORTED_PYTHONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
6+
7+
# Lint and autopep run on a single canonical version: on Python 3.12+ the PEP
8+
# 701 f-string tokenization changes cause pycodestyle false positives, so CI
9+
# lints only on 3.10 and we match that here.
10+
CANONICAL_PYTHON = "3.10"
11+
12+
13+
@nox.session(python=SUPPORTED_PYTHONS)
414
def tests(session):
515
# same as pip install -r -requirements.txt
616
session.install("-r", "requirements.txt")
717
session.install("pytest")
818
session.run("pytest", "-v", "tests")
919

1020

11-
@nox.session(python=["3.9","3.11"])
21+
@nox.session(python=CANONICAL_PYTHON)
1222
def lint(session):
1323
session.install("flake8")
1424
session.install("flake8-docstrings")
1525
session.run("flake8", "./azure/")
1626

17-
@nox.session(python=["3.9","3.11"])
27+
@nox.session(python=SUPPORTED_PYTHONS)
1828
def typecheck(session):
1929
session.install("-r", "requirements.txt")
2030
session.install("mypy")
2131
session.run("mypy", "./azure/")
2232

23-
@nox.session(python=["3.9","3.11"])
33+
@nox.session(python=CANONICAL_PYTHON)
2434
def autopep(session):
2535
session.install("-r", "requirements.txt")
2636
session.run("autopep8", "--in-place --aggressive --aggressive --recursive \"./azure/\"")

requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
flake8==3.7.8
2-
flake8-docstrings==1.5.0
3-
pytest==7.1.2
1+
flake8==7.1.1
2+
flake8-docstrings==1.7.0
3+
pytest==9.0.3
44
python-dateutil==2.8.0
5-
requests==2.32.4
5+
requests==2.33.0
66
jsonschema==4.25.1
7-
aiohttp==3.13.4
7+
aiohttp==3.14.1
88
azure-functions>=1.11.3b3
99
nox==2019.11.9
1010
furl==2.1.0
11-
pytest-asyncio==0.20.2
12-
autopep8
11+
pytest-asyncio==1.4.0
12+
autopep8==2.3.2
1313
types-python-dateutil
1414
opentelemetry-api==1.32.1
1515
opentelemetry-sdk==1.32.1

setup.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,34 +45,39 @@ def run(self, *args, **kwargs):
4545
'License :: OSI Approved :: MIT License',
4646
'Intended Audience :: Developers',
4747
'Programming Language :: Python :: 3',
48+
'Programming Language :: Python :: 3.10',
49+
'Programming Language :: Python :: 3.11',
50+
'Programming Language :: Python :: 3.12',
51+
'Programming Language :: Python :: 3.13',
52+
'Programming Language :: Python :: 3.14',
4853
'Operating System :: Microsoft :: Windows',
4954
'Operating System :: POSIX',
5055
'Operating System :: MacOS :: MacOS X',
5156
'Environment :: Web Environment',
5257
'Development Status :: 5 - Production/Stable',
5358
],
5459
license='MIT',
55-
python_requires='>=3.9,<4',
60+
python_requires='>=3.10,<4',
5661
install_requires=[
5762
'azure-functions>=1.12.0',
58-
'aiohttp>=3.13.3',
59-
'requests==2.*',
63+
'aiohttp>=3.14.1',
64+
'requests>=2.33.0,<3',
6065
'python-dateutil>=2.8.0',
6166
'furl>=2.1.0',
6267
'opentelemetry-api>=1.32.1',
6368
'opentelemetry-sdk>=1.32.1'
6469
],
6570
extra_requires=[
66-
'flake8==3.7.8',
67-
'flake8-docstrings==1.5.0',
68-
'pytest==7.1.2',
71+
'flake8==7.1.1',
72+
'flake8-docstrings==1.7.0',
73+
'pytest==9.0.3',
6974
'python-dateutil==2.8.0',
70-
'requests==2.22.0',
75+
'requests==2.33.0',
7176
'jsonschema==4.25.1',
7277
'azure-functions>=1.2.0',
7378
'nox==2019.11.9',
7479
'furl==2.1.0',
75-
'pytest-asyncio==0.20.2'
80+
'pytest-asyncio==1.4.0'
7681
],
7782
include_package_data=True,
7883
data_files= [

0 commit comments

Comments
 (0)