Skip to content

Commit ef36abe

Browse files
authored
feat: support Python 3.14 (#982)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 11c0717 commit ef36abe

File tree

44 files changed

+2407
-2010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2407
-2010
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ concurrency:
3232

3333
env:
3434
REPORTS_DIR: CI_reports
35-
PYTHON_VERSION: "3.12"
35+
PYTHON_VERSION: "3.14"
3636
POETRY_VERSION: "1.8.1"
3737

3838
permissions: {}

.github/workflows/python.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ concurrency:
3636
cancel-in-progress: true
3737

3838
env:
39-
PYTHON_VERSION_DEFAULT: "3.12"
39+
PYTHON_VERSION_DEFAULT: "3.14"
4040
POETRY_VERSION: "1.8.1"
4141
REPORTS_DIR: CI_reports
4242
TESTS_REPORTS_ARTIFACT: tests-reports
@@ -122,7 +122,7 @@ jobs:
122122
fail-fast: false
123123
matrix:
124124
include:
125-
- python-version: '3.13' # latest
125+
- python-version: '3.14' # latest
126126
os: ubuntu-latest
127127
toxenv-factors: '-current'
128128
- python-version: '3.9' # lowest
@@ -210,7 +210,8 @@ jobs:
210210
- macos-latest
211211
- windows-latest
212212
python-version:
213-
- "3.13" # highest supported
213+
- "3.14" # highest supported
214+
- "3.13"
214215
- "3.12"
215216
- "3.11"
216217
- "3.10"

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ classifiers = [
5757
"Programming Language :: Python :: 3.11",
5858
"Programming Language :: Python :: 3.12",
5959
"Programming Language :: Python :: 3.13",
60+
"Programming Language :: Python :: 3.14",
6061
"Typing :: Typed"
6162
]
6263
[tool.poetry.urls]

tests/_data/infiles/environment/with-extras/init.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"""
2121

2222
from os import name as os_name
23-
from os.path import dirname, join
23+
from os.path import dirname, isdir, join
2424
from subprocess import PIPE, CompletedProcess, run # nosec:B404
25-
from sys import argv, executable
25+
from sys import argv, executable, version_info
2626
from typing import Any
2727
from venv import EnvBuilder
2828

@@ -44,14 +44,18 @@ def pip_run(*args: str, **kwargs: Any) -> CompletedProcess:
4444
res = run(call, **kwargs, cwd=this_dir, shell=False) # nosec:B603
4545
if res.returncode != 0:
4646
raise RuntimeError('process failed')
47+
4748
return res
4849

4950

50-
def pip_install(*args: str) -> None:
51+
def pip_install(*args: str, site_packages_dir: str) -> None:
5152
pip_run(
5253
'install', '--require-virtualenv', '--no-input', '--progress-bar=off', '--no-color',
54+
'--python-version=3.14', # needed for compatibility/reproducibility
55+
'--only-binary=:all:',
56+
'--target', site_packages_dir,
5357
'-c', constraint_file, # needed for reproducibility
54-
*args
58+
*args,
5559
)
5660

5761

@@ -62,13 +66,23 @@ def main() -> None:
6266
with_pip=False,
6367
).create(env_dir)
6468

69+
try:
70+
spd = next(filter(isdir, (
71+
join(env_dir, 'lib', f'python{version_info[0]}.{version_info[1]}', 'site-packages'),
72+
join(env_dir, 'Lib', 'site-packages') # windows ?
73+
)))
74+
except StopIteration:
75+
raise RuntimeError('site-packages not found')
76+
6577
pip_install(
66-
'cyclonedx-python-lib[xml-validation,json-validation]',
78+
'cyclonedx-python-lib[xml-validation,json-validation]==11.2',
6779
# additionals for reproducibility foo
6880
'importlib-resources>=1.4.0',
6981
'pkgutil-resolve-name>=1.3.10',
7082
'zipp>=3.1.0',
71-
'jsonschema-specifications==2023.03.6',
83+
'jsonschema-specifications>=2023.03.6',
84+
'typing_extensions>=4',
85+
site_packages_dir=spd
7286
)
7387

7488

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
arrow==1.3.0
2-
attrs==24.2.0
3-
boolean.py==4.0
4-
cyclonedx-python-lib==8.2.0
2+
attrs==25.4.0
3+
boolean.py==5.0
4+
cyclonedx-python-lib==11.2.0
55
defusedxml==0.7.1
66
fqdn==1.5.1
7-
idna==3.10
7+
idna==3.11
88
importlib_resources==6.4.5
99
isoduration==20.11.0
1010
jsonpointer==3.0.0
11-
jsonschema==4.23.0
11+
jsonschema==4.25.1
1212
jsonschema-specifications==2023.3.6
13-
license-expression==30.3.1
14-
lxml==5.3.0
15-
packageurl-python==0.16.0
13+
lark==1.3.0
14+
license-expression==30.4.4
15+
lxml==6.0.2
16+
packageurl-python==0.17.5
1617
pkgutil_resolve_name==1.3.10
17-
py-serializable==1.1.2
18+
py-serializable==2.1.0
1819
python-dateutil==2.9.0.post0
19-
referencing==0.35.1
20+
referencing==0.37.0
2021
rfc3339-validator==0.1.4
21-
rfc3987==1.3.8
22-
rpds-py==0.20.0
23-
six==1.16.0
22+
rfc3986-validator==0.1.1
23+
rfc3987-syntax==1.1.0
24+
rpds-py==0.27.1
25+
six==1.17.0
2426
sortedcontainers==2.4.0
25-
types-python-dateutil==2.9.0.20241003
27+
types-python-dateutil==2.9.0.20251008
28+
typing_extensions==4.15.0
2629
uri-template==1.3.0
27-
webcolors==24.8.0
30+
webcolors==24.11.1
2831
zipp==3.20.2

tests/_data/infiles/environment/with-license-pep639/init.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ def main() -> None:
6565
pip_install(
6666
'--no-dependencies',
6767
# with License-Expression
68-
'attrs',
68+
'attrs==23.2.0',
6969
# with License-File
70-
'boolean.py',
71-
'jsonpointer',
72-
'license_expression',
73-
'lxml',
70+
'boolean.py==4.0',
71+
'jsonpointer==2.4',
72+
'license_expression==30.3.0',
7473
'chardet==5.2.0', # https://github.com/CycloneDX/cyclonedx-python/issues/931
7574
# with expression-like License AND License-File
7675
'cryptography==43.0.1', # https://github.com/CycloneDX/cyclonedx-python/issues/826

tests/_data/infiles/environment/with-license-pep639/pinning.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ chardet==5.2.0
44
cryptography==43.0.1
55
jsonpointer==2.4
66
license-expression==30.3.0
7-
lxml==5.3.0

tests/_data/snapshots/environment/plain_with-extras_1.0.xml.bin

Lines changed: 53 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)