Skip to content

Commit 1fe4d4e

Browse files
committed
use 3.14.0-rc.2 but use 3.14 in tests
1 parent 8c297c9 commit 1fe4d4e

File tree

2 files changed

+16
-76
lines changed

2 files changed

+16
-76
lines changed

azure-pipelines/pipelines.yaml

Lines changed: 4 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ pr:
1414
include:
1515
- '*'
1616

17-
# Parameter to optionally include hosted Python 3.14 in matrices once images support it.
18-
parameters:
19-
- name: includeHostedPy314
20-
type: boolean
21-
default: false
22-
# Set to true after hosted agents list Python 3.14 in software inventory.
23-
2417
variables:
2518
architecture: x64
2619
PYDEVD_ATTACH_TO_PROCESS: src/debugpy/_vendored/pydevd/pydevd_attach_to_process
@@ -169,65 +162,6 @@ stages:
169162

170163
- template: templates/run_tests.yml
171164

172-
# Experimental Python 3.14 job (Linux only) until hosted agents include 3.14.
173-
# Uses official python:3.14 (or rc) container image so we don't need system preinstall.
174-
- job: Tests_Linux_Py314_Experimental
175-
displayName: Tests - Linux (py314 experimental)
176-
timeoutInMinutes: 45
177-
pool:
178-
vmImage: ubuntu-latest
179-
container: python:3.14-rc
180-
continueOnError: true # Allow pipeline success even if experimental version fails
181-
variables:
182-
python.version: 3.14
183-
steps:
184-
- script: |
185-
echo "Python in container:" && python --version
186-
python -m pip install -U pip
187-
displayName: Initialize Python 3.14
188-
189-
# Optional: install gdb & enable ptrace for tests needing debugger attach (keep lightweight)
190-
- script: |
191-
apt-get update
192-
apt-get --yes install gdb
193-
sysctl kernel.yama.ptrace_scope=0 || true
194-
displayName: (Optional) Enable gdb / ptrace
195-
continueOnError: true
196-
197-
- download: current
198-
displayName: Download pydevd binaries
199-
artifact: pydevd binaries
200-
201-
- task: CopyFiles@2
202-
displayName: Copy pydevd binaries
203-
inputs:
204-
SourceFolder: $(Pipeline.Workspace)/pydevd binaries
205-
TargetFolder: $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
206-
207-
- script: |
208-
python -m pip install tox
209-
echo "tox environment: py314"
210-
python -m tox -e py314 -- --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
211-
displayName: Run tests (py314 experimental)
212-
env:
213-
DEBUGPY_PROCESS_SPAWN_TIMEOUT: 60
214-
DEBUGPY_LAUNCH_TIMEOUT: 60
215-
216-
- task: PublishBuildArtifacts@1
217-
displayName: Publish test logs (py314 experimental)
218-
inputs:
219-
artifactName: Test logs py314
220-
pathToPublish: $(Build.ArtifactStagingDirectory)/logs
221-
condition: failed()
222-
223-
- task: PublishTestResults@2
224-
displayName: Publish test results (py314 experimental)
225-
inputs:
226-
testRunTitle: $(Agent.JobName)
227-
testResultsFiles: tests.xml
228-
searchFolder: $(Build.ArtifactStagingDirectory)
229-
condition: always()
230-
231165
- job: Tests_Mac
232166
timeoutInMinutes: 30
233167
displayName: Tests - macOS
@@ -246,9 +180,8 @@ stages:
246180
python.version: 3.12
247181
py313:
248182
python.version: 3.13
249-
${{ if eq(parameters.includeHostedPy314, true) }}:
250-
py314:
251-
python.version: 3.14
183+
py314:
184+
python.version: 3.14.0-rc.2
252185

253186
steps:
254187

@@ -295,9 +228,8 @@ stages:
295228
python.version: 3.12
296229
py313:
297230
python.version: 3.13
298-
${{ if eq(parameters.includeHostedPy314, true) }}:
299-
py314:
300-
python.version: 3.14
231+
py314:
232+
python.version: 3.14.0-rc.2
301233

302234
steps:
303235

azure-pipelines/templates/run_tests.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,19 @@ steps:
33
displayName: Setup Python packages
44

55
- pwsh: |
6-
$toxEnv = '$(python.version)'
7-
if (-not $toxEnv.startsWith('pypy')) {
8-
$toxEnv = 'py' + $toxEnv.Replace('.', '')
6+
$raw = '$(python.version)'
7+
if ($raw.StartsWith('pypy')) {
8+
# For PyPy keep original pattern stripping dots after first two numeric components if needed later.
9+
$toxEnv = 'py' + ($raw -replace '^pypy(\d+)\.(\d+).*$','$1$2')
910
}
10-
echo 'tox environment: $toxEnv'
11+
else {
12+
# Extract major.minor even from prerelease like 3.14.0-rc.2 -> 3.14
13+
$mm = [regex]::Match($raw,'^(\d+)\.(\d+)')
14+
if (-not $mm.Success) { throw "Unable to parse python.version '$raw'" }
15+
$toxEnv = 'py' + $mm.Groups[1].Value + $mm.Groups[2].Value
16+
}
17+
Write-Host "python.version raw: $raw"
18+
Write-Host "Derived tox environment: $toxEnv"
1119
python -m tox -e $toxEnv -- --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
1220
displayName: Run tests using tox
1321
env:

0 commit comments

Comments
 (0)