Skip to content

Commit

Permalink
Support 3.14 (#110)
Browse files Browse the repository at this point in the history
* Recognize _interpreters module constant for 3.13+

* Regenerate for changes in 3.13, support 3.14

* Fix readme test to support new version
  • Loading branch information
thatch authored Aug 25, 2024
1 parent 6ccfddd commit 2184105
Show file tree
Hide file tree
Showing 9 changed files with 347 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ easier:
```pycon
>>> from stdlibs import stdlib_module_names, KNOWN_VERSIONS
>>> [v for v in KNOWN_VERSIONS if "dataclasses" in stdlib_module_names(v)]
['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
>>>
>>> sorted(stdlib_module_names("3.7") - stdlib_module_names("3.6"))
['_abc', '_contextvars', '_py_abc', '_queue', '_uuid', '_xxtestfuzz', 'contextvars', 'dataclasses']
Expand Down
5 changes: 5 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Generated modules for each major Python release in :data:`.KNOWN_VERSIONS`.

.. module:: stdlibs.py

.. autodata:: module_names
:no-value:

.. module:: stdlibs.py314

.. autodata:: module_names
:no-value:

Expand Down
7 changes: 6 additions & 1 deletion stdlibs/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,12 @@ def regen(version: str) -> Set[str]:
names.append(p.with_suffix("").name)
elif p.name == "socketmodule.c":
names.append("_socket")
elif p.name in ("posixmodule.c",):
elif p.name in (
"posixmodule.c",
"_interpretersmodule.c",
"_interpqueuesmodule.c",
"_interpchannelsmodule.c",
):
names.append(p.name.split("module")[0])
elif p.as_posix().endswith("_sre/sre.c"):
names.append("_sre")
Expand Down
1 change: 1 addition & 0 deletions stdlibs/known.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"3.11",
"3.12",
"3.13",
"3.14",
]
"""All supported Python major releases"""
2 changes: 2 additions & 0 deletions stdlibs/py.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
"_sysconfig",
"_testbuffer",
"_testcapi",
"_testcapi_datetime",
"_testclinic",
"_testclinic_limited",
"_testconsole",
Expand Down Expand Up @@ -245,6 +246,7 @@
"aetypes",
"aifc",
"al",
"annotationlib",
"antigravity",
"anydbm",
"applesingle",
Expand Down
2 changes: 2 additions & 0 deletions stdlibs/py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"_sysconfig",
"_testbuffer",
"_testcapi",
"_testcapi_datetime",
"_testclinic",
"_testclinic_limited",
"_testconsole",
Expand All @@ -147,6 +148,7 @@
"_zoneinfo",
"abc",
"aifc",
"annotationlib",
"antigravity",
"argparse",
"array",
Expand Down
1 change: 1 addition & 0 deletions stdlibs/py313.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"_sysconfig",
"_testbuffer",
"_testcapi",
"_testcapi_datetime",
"_testclinic",
"_testclinic_limited",
"_testconsole",
Expand Down
Loading

0 comments on commit 2184105

Please sign in to comment.