Skip to content

Commit 19c6330

Browse files
scbeddxiangyan99
andauthored
Python 3.13-rc.3 In Platform Matrix (#37508)
* add python 3.13 to our test matrix across all packages * skip py313 for azure-ai-ml * update azure-core-experimental tests to no longer fail on py313 (thanks Xiang!) * bump the minimum version of azure-core for azure-cosmos to 1.30.0 (for mindependency only, not setup.py) --------- Co-authored-by: Xiang Yan <[email protected]>
1 parent b6909f0 commit 19c6330

12 files changed

+88
-41
lines changed

eng/pipelines/templates/jobs/tests-nightly-python.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
displayName: Validate Release Candidate Python - Linux
1616
variables:
1717
skipComponentGovernanceDetection: true
18-
PythonVersion: '3.13.0-rc.2'
18+
PythonVersion: '3.13.0-rc.3'
1919
TargetedPackages: ${{ parameters.TargetedPackages }}
2020

2121
timeoutInMinutes: 90

eng/pipelines/templates/stages/platform-matrix-excluding-pypy.json

+11
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@
3636
"TestSamples": "false"
3737
}
3838
}
39+
},
40+
{
41+
"Config": {
42+
"Ubuntu2004_3130": {
43+
"OSVmImage": "env:LINUXVMIMAGE",
44+
"Pool": "env:LINUXPOOL",
45+
"PythonVersion": "3.13.0-rc.3",
46+
"CoverageArg": "--disablecov",
47+
"TestSamples": "false"
48+
}
49+
}
3950
}
4051
]
4152
}

eng/pipelines/templates/stages/platform-matrix-no-312.json

-31
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"displayNames": {
3+
"--disablecov": "",
4+
"false": "",
5+
"true": ""
6+
},
7+
"matrix": {
8+
"Agent": {
9+
"windows-2022": { "OSVmImage": "env:WINDOWSVMIMAGE", "Pool": "env:WINDOWSPOOL" },
10+
"ubuntu-20.04": { "OSVmImage": "env:LINUXVMIMAGE", "Pool": "env:LINUXPOOL" },
11+
"macos-latest": { "OSVmImage": "env:MACVMIMAGE", "Pool": "env:MACPOOL" }
12+
},
13+
"PythonVersion": [ "3.8", "pypy3.9", "3.11", "3.10"],
14+
"CoverageArg": "--disablecov",
15+
"TestSamples": "false"
16+
},
17+
"include": [
18+
{
19+
"CoverageConfig": {
20+
"ubuntu2004_39_coverage": {
21+
"OSVmImage": "env:LINUXVMIMAGE",
22+
"Pool": "env:LINUXPOOL",
23+
"PythonVersion": "3.9",
24+
"CoverageArg": "",
25+
"TestSamples": "false"
26+
}
27+
}
28+
},
29+
{
30+
"Config": {
31+
"Ubuntu2004_312": {
32+
"OSVmImage": "env:LINUXVMIMAGE",
33+
"Pool": "env:LINUXPOOL",
34+
"PythonVersion": "3.12",
35+
"CoverageArg": "--disablecov",
36+
"TestSamples": "false"
37+
}
38+
}
39+
}
40+
]
41+
}

eng/pipelines/templates/stages/platform-matrix.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ubuntu-20.04": { "OSVmImage": "env:LINUXVMIMAGE", "Pool": "env:LINUXPOOL" },
1111
"macos-latest": { "OSVmImage": "env:MACVMIMAGE", "Pool": "env:MACPOOL" }
1212
},
13-
"PythonVersion": [ "3.8", "pypy3.9", "3.11", "3.10" ],
13+
"PythonVersion": [ "3.8", "pypy3.9", "3.11", "3.10", "3.12" ],
1414
"CoverageArg": "--disablecov",
1515
"TestSamples": "false"
1616
},
@@ -28,10 +28,10 @@
2828
},
2929
{
3030
"Config": {
31-
"Ubuntu2004_312": {
31+
"Ubuntu2004_313": {
3232
"OSVmImage": "env:LINUXVMIMAGE",
3333
"Pool": "env:LINUXPOOL",
34-
"PythonVersion": "3.12",
34+
"PythonVersion": "3.13.0-rc.3",
3535
"CoverageArg": "--disablecov",
3636
"TestSamples": "false"
3737
}

eng/pipelines/templates/steps/use-python-version.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ steps:
1919
displayName: "Use Python ${{ parameters.versionSpec }}"
2020
inputs:
2121
versionSpec: ${{ parameters.versionSpec }}
22+
allowUnstable: true

eng/tox/install_depend_packages.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,23 @@
6060
"azure-identity": {"msal": "1.23.0"},
6161
"azure-core-tracing-opentelemetry": {"azure-core": "1.28.0"},
6262
"azure-storage-file-datalake": {"azure-storage-blob": "12.22.0"},
63+
"azure-cosmos": {"azure-core": "1.30.0"}
6364
}
6465

6566
MAXIMUM_VERSION_SPECIFIC_OVERRIDES = {}
6667

6768
# PLATFORM SPECIFIC OVERRIDES provide additional generic (EG not tied to the package whos dependencies are being processed)
6869
# filtering on a _per platform_ basis. Primarily used to limit certain packages due to platform compatbility
6970
PLATFORM_SPECIFIC_MINIMUM_OVERRIDES = {
70-
">=3.12.0": {"azure-core": "1.23.1", "aiohttp": "3.8.6", "six": "1.16.0", "requests": "2.30.0"}
71+
">=3.12.0": {
72+
"azure-core": "1.23.1",
73+
"aiohttp": "3.8.6",
74+
"six": "1.16.0",
75+
"requests": "2.30.0"
76+
},
77+
">=3.13.0": {
78+
"typing-extensions": "4.12.0",
79+
}
7180
}
7281

7382
PLATFORM_SPECIFIC_MAXIMUM_OVERRIDES = {}

sdk/core/azure-core-experimental/tests/test_pyodide_transport.py

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def create_mock_response(self, body: bytes, headers: dict, status: int, status_t
9696
return response_promise
9797

9898
@pytest.mark.asyncio
99+
@pytest.mark.skipif(sys.version_info >= (3, 13), reason="cgi is removed in Python 3.13")
99100
async def test_successful_send(self, mock_pyfetch, mock_pyodide_module, pipeline):
100101
"""Test that a successful send returns the correct values."""
101102
# setup data
@@ -143,6 +144,7 @@ async def test_successful_send(self, mock_pyfetch, mock_pyodide_module, pipeline
143144
assert not kwargs["files"]
144145

145146
@pytest.mark.asyncio
147+
@pytest.mark.skipif(sys.version_info >= (3, 13), reason="cgi is removed in Python 3.13")
146148
async def test_unsuccessful_send(self, mock_pyfetch, mock_pyodide_module, pipeline):
147149
"""Test that the pipeline is failing correctly."""
148150
mock_pyfetch.reset_mock()
@@ -154,6 +156,7 @@ async def test_unsuccessful_send(self, mock_pyfetch, mock_pyodide_module, pipeli
154156
# 3 retries plus the original request.
155157
assert mock_pyfetch.call_count == retry_total + 1
156158

159+
@pytest.mark.skipif(sys.version_info >= (3, 13), reason="cgi is removed in Python 3.13")
157160
def test_valid_import(self, transport):
158161
"""Test that we can import Pyodide classes from `azure.core.pipeline.transport`
159162
Adding the transport fixture will mock the Pyodide modules in `sys.modules`.

sdk/core/azure-core-experimental/tests/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# ASYNC_TRANSPORTS.append(AsyncHttpXTransport)
3636

3737

38-
from azure.core.experimental.transport import PyodideTransport
38+
# from azure.core.experimental.transport import PyodideTransport
3939

4040
# ASYNC_TRANSPORTS.append(PyodideTransport)
4141

sdk/core/azure-core/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

sdk/cosmos/cosmos-emulator-matrix.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,16 @@
4444
"ACCOUNT_HOST": "https://localhost:8081/",
4545
"ACCOUNT_KEY": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
4646
"Skip.Analyze": "true"
47+
},
48+
"Emulator Tests Python 3.13": {
49+
"PythonVersion": "3.13.0-rc.3",
50+
"CoverageArg": "--disablecov",
51+
"TestSamples": "false",
52+
"ToxTestEnv": "'whl,sdist'",
53+
"ACCOUNT_HOST": "https://localhost:8081/",
54+
"ACCOUNT_KEY": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
55+
"Skip.Analyze": "true"
4756
}
4857
}
4958
}
5059
}
51-

sdk/ml/ci.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ trigger:
1111
include:
1212
- sdk/ml/
1313
- scripts/
14-
- sdk/core/
14+
- sdk/core/
1515

1616
pr:
1717
branches:
@@ -24,7 +24,7 @@ pr:
2424
paths:
2525
include:
2626
- sdk/ml/
27-
- sdk/core/
27+
- sdk/core/
2828

2929
extends:
3030
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
@@ -33,6 +33,11 @@ extends:
3333
ValidateFormatting: true
3434
TestTimeoutInMinutes: 75
3535
TestProxy: true
36+
MatrixConfigs:
37+
- Name: ml_ci_matrix
38+
Path: eng/pipelines/templates/stages/platform-matrix-no-313.json
39+
Selection: sparse
40+
GenerateVMJobs: true
3641
# This is a short term solution to create API review for python azure-ml package only when running pipeline manually
3742
# Long term solution should be to have different versions on main branch and release branch for python package so APIView can have different revisions for each version.
3843
# Tracking issue: https://github.com/Azure/azure-sdk-for-python/issues/29196

0 commit comments

Comments
 (0)