Skip to content

Commit 0338387

Browse files
authored
listgen: add Python 3.12 (#98)
* listgen: add Python 3.12 * README: bump Python version * docs: bump Python version * listgen: handle missing list case * listgen: oops * stdlib_list: add 3.12 to long_versions * ci: run CI on 3.12 * pyproject: update description
1 parent 78213ab commit 0338387

File tree

6 files changed

+22
-9
lines changed

6 files changed

+22
-9
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- "3.9"
1818
- "3.10"
1919
- "3.11"
20+
- "3.12"
2021
runs-on: ubuntu-latest
2122
steps:
2223
- uses: actions/checkout@v4

.github/workflows/listgen.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@ jobs:
7070
python ./support/walk-modules.py "${LISTGEN_PYTHON_VERSION}.txt" < pre-list.txt
7171
rm pre-list.txt
7272
73-
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
74-
./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
75-
"${LISTGEN_PYTHON_VERSION}.txt"
73+
if [[ -f "./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt"" ]]; then
74+
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
75+
./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
76+
"${LISTGEN_PYTHON_VERSION}.txt"
77+
else
78+
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
79+
"${LISTGEN_PYTHON_VERSION}.txt"
80+
fi
7681
7782
rm "${LISTGEN_PYTHON_VERSION}.txt"
7883
@@ -102,6 +107,7 @@ jobs:
102107
python:
103108
- "3.10"
104109
- "3.11"
110+
- "3.12"
105111

106112
runs-on: ubuntu-latest
107113

@@ -119,9 +125,14 @@ jobs:
119125
run: |
120126
python ./support/walk-modules.py "${LISTGEN_PYTHON_VERSION}.txt"
121127
122-
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
123-
./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
124-
"${LISTGEN_PYTHON_VERSION}.txt"
128+
if [[ -f "./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt"" ]]; then
129+
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
130+
./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
131+
"${LISTGEN_PYTHON_VERSION}.txt"
132+
else
133+
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
134+
"${LISTGEN_PYTHON_VERSION}.txt"
135+
fi
125136
126137
rm "${LISTGEN_PYTHON_VERSION}.txt"
127138

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![CI](https://github.com/pypi/stdlib-list/actions/workflows/ci.yml/badge.svg)](https://github.com/pypi/stdlib-list/actions/workflows/ci.yml)
66

77
This package includes lists of all of the standard libraries for Python 2.6
8-
through 3.11.
8+
through 3.12.
99

1010
**IMPORTANT**: If you're on Python 3.10 or newer, you **probably don't need this library**.
1111
See [`sys.stdlib_module_names`](https://docs.python.org/3/library/sys.html#sys.stdlib_module_names)

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ stdlib-list
22
===========
33

44
This package includes lists of all of the standard libraries for Python 2.6
5-
through 3.11.
5+
through 3.12.
66

77
.. note::
88

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ include = ["tests/"]
1111
[project]
1212
name = "stdlib-list"
1313
dynamic = ["version"]
14-
description = "A list of Python Standard Libraries (2.7 through 3.11)."
14+
description = "A list of Python Standard Libraries (2.7 through 3.12)."
1515
readme = "README.md"
1616
license = { file = "LICENSE" }
1717
authors = [{ name = "Jack Maney", email = "[email protected]" }]

stdlib_list/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"3.9",
1919
"3.10",
2020
"3.11",
21+
"3.12",
2122
]
2223

2324
short_versions = [".".join(x.split(".")[:2]) for x in long_versions]

0 commit comments

Comments
 (0)