mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
update testing for python 3.14 (#1955)
Some checks failed
Code scanning - action / CodeQL-Build (push) Has been cancelled
Some checks failed
Code scanning - action / CodeQL-Build (push) Has been cancelled
* update testing for python 3.14 * Allow python 3.14 in attach code * move 3.14 to its own job outside of matrix * try 3.14.0-rc.2 * allowUnstable * use 3.14.0-rc.2 but use 3.14 in tests
This commit is contained in:
parent
2eb3afede0
commit
6cbdf8767e
7 changed files with 36 additions and 17 deletions
|
|
@ -114,7 +114,7 @@ In order to update the source, you would:
|
|||
|
||||
You might need to regenerate the Cython modules after any changes. This can be done by:
|
||||
|
||||
- Install Python latest (3.12 as of this writing)
|
||||
- Install Python latest (3.14 as of this writing)
|
||||
- pip install cython 'django>=1.9' 'setuptools>=0.9' 'wheel>0.21' twine
|
||||
- On a windows machine:
|
||||
- set FORCE_PYDEVD_VC_VARS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat
|
||||
|
|
|
|||
|
|
@ -135,6 +135,8 @@ stages:
|
|||
python.version: 3.12
|
||||
py313:
|
||||
python.version: 3.13
|
||||
py314:
|
||||
python.version: 3.14.0-rc.2
|
||||
|
||||
steps:
|
||||
|
||||
|
|
@ -178,6 +180,8 @@ stages:
|
|||
python.version: 3.12
|
||||
py313:
|
||||
python.version: 3.13
|
||||
py314:
|
||||
python.version: 3.14.0-rc.2
|
||||
|
||||
steps:
|
||||
|
||||
|
|
@ -224,6 +228,8 @@ stages:
|
|||
python.version: 3.12
|
||||
py313:
|
||||
python.version: 3.13
|
||||
py314:
|
||||
python.version: 3.14.0-rc.2
|
||||
|
||||
steps:
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,19 @@ steps:
|
|||
displayName: Setup Python packages
|
||||
|
||||
- pwsh: |
|
||||
$toxEnv = '$(python.version)'
|
||||
if (-not $toxEnv.startsWith('pypy')) {
|
||||
$toxEnv = 'py' + $toxEnv.Replace('.', '')
|
||||
$raw = '$(python.version)'
|
||||
if ($raw.StartsWith('pypy')) {
|
||||
# For PyPy keep original pattern stripping dots after first two numeric components if needed later.
|
||||
$toxEnv = 'py' + ($raw -replace '^pypy(\d+)\.(\d+).*$','$1$2')
|
||||
}
|
||||
echo 'tox environment: $toxEnv'
|
||||
else {
|
||||
# Extract major.minor even from prerelease like 3.14.0-rc.2 -> 3.14
|
||||
$mm = [regex]::Match($raw,'^(\d+)\.(\d+)')
|
||||
if (-not $mm.Success) { throw "Unable to parse python.version '$raw'" }
|
||||
$toxEnv = 'py' + $mm.Groups[1].Value + $mm.Groups[2].Value
|
||||
}
|
||||
Write-Host "python.version raw: $raw"
|
||||
Write-Host "Derived tox environment: $toxEnv"
|
||||
python -m tox -e $toxEnv -- --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
|
||||
displayName: Run tests using tox
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -3,4 +3,5 @@ steps:
|
|||
inputs:
|
||||
versionSpec: $(python.version)
|
||||
architecture: $(architecture)
|
||||
allowUnstable: true
|
||||
displayName: Use Python $(python.version) $(architecture)
|
||||
|
|
|
|||
18
setup.py
18
setup.py
|
|
@ -78,14 +78,12 @@ def override_build_py(cmds):
|
|||
"Compiling pydevd Cython extension modules (set SKIP_CYTHON_BUILD=1 to omit)."
|
||||
)
|
||||
try:
|
||||
subprocess.check_call(
|
||||
[
|
||||
sys.executable,
|
||||
os.path.join(PYDEVD_ROOT, "setup_pydevd_cython.py"),
|
||||
"build_ext",
|
||||
"--inplace",
|
||||
]
|
||||
)
|
||||
subprocess.check_call([
|
||||
sys.executable,
|
||||
os.path.join(PYDEVD_ROOT, "setup_pydevd_cython.py"),
|
||||
"build_ext",
|
||||
"--inplace",
|
||||
])
|
||||
except subprocess.SubprocessError:
|
||||
# pydevd Cython extensions are optional performance enhancements, and debugpy is
|
||||
# usable without them. Thus, we want to ignore build errors here by default, so
|
||||
|
|
@ -170,6 +168,8 @@ if __name__ == "__main__":
|
|||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Programming Language :: Python :: 3.14",
|
||||
"Topic :: Software Development :: Debuggers",
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Operating System :: MacOS",
|
||||
|
|
@ -202,5 +202,5 @@ if __name__ == "__main__":
|
|||
"debugpy-adapter = debugpy.adapter.__main__:main",
|
||||
],
|
||||
},
|
||||
**extras
|
||||
**extras,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ enum PythonVersion {
|
|||
PythonVersion_311 = 0x030B,
|
||||
PythonVersion_312 = 0x030C,
|
||||
PythonVersion_313 = 0x030D,
|
||||
PythonVersion_314 = 0x030E,
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -78,6 +79,9 @@ static PythonVersion GetPythonVersion(void *module) {
|
|||
if(version[3] == '3'){
|
||||
return PythonVersion_313;
|
||||
}
|
||||
if(version[3] == '4'){
|
||||
return PythonVersion_314;
|
||||
}
|
||||
}
|
||||
return PythonVersion_Unknown; // we don't care about 3.1 anymore...
|
||||
|
||||
|
|
|
|||
6
tox.ini
6
tox.ini
|
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py{38,39,310,311,312,313}{,-cov}
|
||||
envlist = py{38,39,310,311,312,313,314}{,-cov}
|
||||
|
||||
[testenv]
|
||||
deps = -rtests/requirements.txt
|
||||
|
|
@ -10,5 +10,5 @@ commands_pre = python build_attach_binaries.py
|
|||
commands =
|
||||
py{38,39}-!cov: python -m pytest {posargs}
|
||||
py{38,39}-cov: python -m pytest --cov --cov-append --cov-config=.coveragerc {posargs}
|
||||
py{310,311,312,313}-!cov: python -Xfrozen_modules=off -m pytest {posargs}
|
||||
py{310,311,312,313}-cov: python -Xfrozen_modules=off -m pytest --cov --cov-append --cov-config=.coveragerc {posargs}
|
||||
py{310,311,312,313,314}-!cov: python -Xfrozen_modules=off -m pytest {posargs}
|
||||
py{310,311,312,313,314}-cov: python -Xfrozen_modules=off -m pytest --cov --cov-append --cov-config=.coveragerc {posargs}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue