Skip to content

Commit f4eb79e

Browse files
authored
feat: add Python 3.13 support (#818)
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent d0b5997 commit f4eb79e

File tree

122 files changed

+1725
-2013
lines changed

Some content is hidden

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

122 files changed

+1725
-2013
lines changed

.github/workflows/python.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ jobs:
7171
fail-fast: false
7272
matrix:
7373
include:
74-
- python-version: '3.12'
74+
- python-version: '3.13' # latest
7575
os: ubuntu-latest
7676
toxenv-factors: '-current'
77-
- python-version: '3.8'
77+
- python-version: '3.8' # lowest
7878
os: ubuntu-latest
7979
toxenv-factors: '-lowest'
8080
steps:
@@ -162,7 +162,8 @@ jobs:
162162
- macos-13 # macos-latest might be incompatible to py38 - see https://github.com/CycloneDX/cyclonedx-python-lib/pull/599#issuecomment-2077462142
163163
- windows-latest
164164
python-version:
165-
- "3.12" # highest supported
165+
- "3.13" # highest supported
166+
- "3.12"
166167
- "3.11"
167168
- "3.10"
168169
- "3.9"

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ include = [
3030
{ path="docs", format=["sdist"] },
3131
]
3232
exclude = [
33-
# exclude dotfiles and dotfolders
34-
"**/.*",
33+
"**/.*", # exclude dotfiles and dotfolders
3534
"docs/_build", "docs/processes",
3635
]
3736
keywords = [
@@ -57,6 +56,7 @@ classifiers = [
5756
"Programming Language :: Python :: 3.10",
5857
"Programming Language :: Python :: 3.11",
5958
"Programming Language :: Python :: 3.12",
59+
"Programming Language :: Python :: 3.13",
6060
"Typing :: Typed"
6161
]
6262
[tool.poetry.urls]

tests/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ def make_xml_comparable(bom: str) -> str:
149149
' <version>\\1</version>\n'
150150
' <externalReferences><!-- stripped --></externalReferences>',
151151
bom)
152+
if sys.version_info < (3, 13):
153+
# py3.13 finally fixed a bug in the XML writer: https://github.com/python/cpython/issues/81555
154+
# no longer escape double-quotes(") in text/non-attribute.
155+
# here is a backwards-compat mode, so we have consistent tests.
156+
bom = re_sub(
157+
r'>[^<]*&quot;[^<]*<',
158+
lambda s: s[0].replace('&quot;', '"'),
159+
bom)
152160
return bom
153161

154162

tests/_data/infiles/environment/normalize-packagename/init.py

+2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ def main() -> None:
6363
).create(env_dir)
6464

6565
pip_install(
66+
'--no-deps', # the clib dep cannot be installed consistently...
6667
# https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
6768
'ruamel-YAML[jinja2]', # actually "ruamel.yaml", normalizes to "ruamel-yaml"
69+
'ruamel-Yaml.Jinja2', # actually "ruamel.yaml.jinja2", normalizes to "ruamel-yaml-jinja2"
6870
)
6971

7072

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

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def main() -> None:
6868
'importlib-resources>=1.4.0',
6969
'pkgutil-resolve-name>=1.3.10',
7070
'zipp>=3.1.0',
71+
'jsonschema-specifications==2023.03.6',
7172
)
7273

7374

Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
arrow==1.3.0
2-
attrs==23.1.0
2+
attrs==24.2.0
33
boolean.py==4.0
4-
cyclonedx-python-lib==6.0.0
4+
cyclonedx-python-lib==8.2.0
55
defusedxml==0.7.1
66
fqdn==1.5.1
7-
idna==3.6
8-
importlib-resources==6.1.1
7+
idna==3.10
8+
importlib_resources==6.4.5
99
isoduration==20.11.0
10-
jsonpointer==2.4
11-
jsonschema==4.20.0
12-
jsonschema-specifications==2023.11.2
13-
license-expression==30.2.0
14-
lxml==4.9.4
15-
packageurl-python==0.13.1
10+
jsonpointer==3.0.0
11+
jsonschema==4.23.0
12+
jsonschema-specifications==2023.3.6
13+
license-expression==30.3.1
14+
lxml==5.3.0
15+
packageurl-python==0.16.0
1616
pkgutil_resolve_name==1.3.10
17-
py-serializable==0.16.0
18-
python-dateutil==2.8.2
19-
referencing==0.32.0
17+
py-serializable==1.1.2
18+
python-dateutil==2.9.0.post0
19+
referencing==0.35.1
2020
rfc3339-validator==0.1.4
2121
rfc3987==1.3.8
22-
rpds-py==0.15.2
22+
rpds-py==0.20.0
2323
six==1.16.0
2424
sortedcontainers==2.4.0
25-
types-python-dateutil==2.8.19.14
25+
types-python-dateutil==2.9.0.20241003
2626
uri-template==1.3.0
27-
webcolors==1.13
28-
zipp==3.17.0
27+
webcolors==24.8.0
28+
zipp==3.20.2

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ attrs==23.2.0
22
boolean.py==4.0
33
jsonpointer==2.4
44
license-expression==30.3.0
5-
lxml==5.2.2
5+
lxml==5.3.0

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.0.xml.bin

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.1.xml.bin

+33-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)