Skip to content

Commit 6cfab10

Browse files
authored
feat(Python 3.13): support Python 3.13 by adding the stdlib builtins list (#262)
* feat(Python 3.13): add stdlib builtins * bump Poetry plugin to 1.28.0 * bump CLI to 1.16.0
1 parent f6c5b73 commit 6cfab10

File tree

4 files changed

+69
-3
lines changed

4 files changed

+69
-3
lines changed

components/polylith/libs/stdlib.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,47 @@ def to_py312(stdlib: set) -> set:
261261
return union(stdlib, news, removed)
262262

263263

264+
def to_py313(stdlib: set) -> set:
265+
news: set = set()
266+
removed = {
267+
"aifc",
268+
"audioop",
269+
"cgi",
270+
"cgitb",
271+
"chunk",
272+
"crypt",
273+
"imghdr",
274+
"lib2to3",
275+
"mailcap",
276+
"msilib",
277+
"nis",
278+
"nntplib",
279+
"ossaudiodev",
280+
"pipes",
281+
"sndhdr",
282+
"spwd",
283+
"sunau",
284+
"telnetlib",
285+
"uu",
286+
"xdrlib",
287+
}
288+
289+
return union(stdlib, news, removed)
290+
291+
264292
py38 = with_extras(stdlib_python_3_8)
265293
py39 = to_py39(py38)
266294
py310 = to_py310(py39)
267295
py311 = to_py311(py310)
268296
py312 = to_py312(py311)
297+
py313 = to_py313(py312)
269298

270299

271-
standard_libs = {"3.8": py38, "3.9": py39, "3.10": py310, "3.11": py311, "3.12": py312}
300+
standard_libs = {
301+
"3.8": py38,
302+
"3.9": py39,
303+
"3.10": py310,
304+
"3.11": py311,
305+
"3.12": py312,
306+
"3.13": py313,
307+
}

projects/poetry_polylith_plugin/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "poetry-polylith-plugin"
3-
version = "1.27.6"
3+
version = "1.28.0"
44
description = "A Poetry plugin that adds tooling support for the Polylith Architecture"
55
authors = ["David Vujic"]
66
homepage = "https://davidvujic.github.io/python-polylith-docs/"

projects/polylith_cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "polylith-cli"
3-
version = "1.15.2"
3+
version = "1.16.0"
44
description = "Python tooling support for the Polylith Architecture"
55
authors = ['David Vujic']
66
homepage = "https://davidvujic.github.io/python-polylith-docs/"

test/components/polylith/libs/test_stdlib.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,33 @@ def test_stdlib_3_12():
4949
"smtpd",
5050
}
5151
assert py312.difference(py311) == set()
52+
53+
54+
def test_stdlib_3_13():
55+
py312 = stdlib.standard_libs["3.12"]
56+
py313 = stdlib.standard_libs["3.13"]
57+
58+
assert py312.difference(py313) == {
59+
"aifc",
60+
"audioop",
61+
"cgi",
62+
"cgitb",
63+
"chunk",
64+
"crypt",
65+
"imghdr",
66+
"lib2to3",
67+
"mailcap",
68+
"msilib",
69+
"nis",
70+
"nntplib",
71+
"ossaudiodev",
72+
"pipes",
73+
"sndhdr",
74+
"spwd",
75+
"sunau",
76+
"telnetlib",
77+
"uu",
78+
"xdrlib",
79+
}
80+
81+
assert py313.difference(py312) == set()

0 commit comments

Comments
 (0)