Skip to content

Commit 4fb131e

Browse files
authored
Merge branch 'main' into copilot/fix-165
2 parents ec1842c + 2345700 commit 4fb131e

File tree

11 files changed

+929
-98
lines changed

11 files changed

+929
-98
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions: {}
11+
1012
jobs:
1113
test:
1214
strategy:
@@ -17,16 +19,18 @@ jobs:
1719
- "3.11"
1820
- "3.12"
1921
- "3.13"
22+
- "3.14"
2023
runs-on: ubuntu-latest
2124
steps:
22-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2326
with:
2427
persist-credentials: false
2528

2629
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2730
with:
2831
python-version: ${{ matrix.python }}
2932
cache: pip
33+
allow-prereleases: true
3034

3135
- name: test
3236
run: make test INSTALL_EXTRA=test
@@ -35,7 +39,7 @@ jobs:
3539
if: always()
3640

3741
needs:
38-
- test
42+
- test
3943

4044
runs-on: ubuntu-latest
4145

@@ -48,7 +52,7 @@ jobs:
4852
lint:
4953
runs-on: ubuntu-latest
5054
steps:
51-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
55+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5256
with:
5357
persist-credentials: false
5458

.github/workflows/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
- main
77
workflow_dispatch:
88

9+
permissions: {}
10+
911
jobs:
1012
build:
1113
runs-on: ubuntu-latest
1214
steps:
13-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1416
with:
1517
persist-credentials: false
1618

@@ -29,7 +31,7 @@ jobs:
2931
make doc
3032
3133
- name: upload docs artifact
32-
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
34+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
3335
with:
3436
path: ./docs/_build/html/
3537

.github/workflows/listgen.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
schedule:
1111
- cron: "0 0 * * 2"
1212

13+
permissions: {}
14+
1315
jobs:
1416
pre-list-legacy:
1517
strategy:
@@ -20,7 +22,7 @@ jobs:
2022
runs-on: ubuntu-latest
2123

2224
steps:
23-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2426
with:
2527
persist-credentials: false
2628

@@ -49,14 +51,14 @@ jobs:
4951
strategy:
5052
matrix:
5153
python:
52-
- "3.7"
53-
- "3.8"
54+
# - "3.7" # EOL
55+
# - "3.8" # EOL
5456
- "3.9"
5557

5658
runs-on: ubuntu-latest
5759

5860
steps:
59-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6062
with:
6163
persist-credentials: false
6264

@@ -115,40 +117,28 @@ jobs:
115117
- "3.11"
116118
- "3.12"
117119
- "3.13"
120+
- "3.14"
118121

119122
runs-on: ubuntu-latest
120123

121124
steps:
122-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
125+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
123126
with:
124127
persist-credentials: false
125128

126-
127129
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
128130
with:
129131
python-version: ${{ matrix.python }}
132+
allow-prereleases: true
130133

131134
- name: walk modules
132135
env:
133136
LISTGEN_PYTHON_VERSION: ${{ matrix.python }}
134-
LISTGEN_DRY_RUN: ${{ inputs.dry-run }}
135-
run: |
136-
python ./support/walk-modules.py "${LISTGEN_PYTHON_VERSION}.txt"
137-
138-
if [[ -f "./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt"" ]]; then
139-
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
140-
./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
141-
"${LISTGEN_PYTHON_VERSION}.txt"
142-
else
143-
sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \
144-
"${LISTGEN_PYTHON_VERSION}.txt"
145-
fi
137+
run: python ./support/walk-modules.py ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt"
146138

147-
rm "${LISTGEN_PYTHON_VERSION}.txt"
148-
149-
if [[ "${LISTGEN_DRY_RUN}" == "true" ]]; then
150-
git diff
151-
fi
139+
- name: show diff
140+
if: ${{ inputs.dry-run }}
141+
run: git diff
152142

153143
- name: create PR
154144
if: ${{ !inputs.dry-run }}

.github/workflows/release.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55

66
name: release
77

8+
permissions: {}
9+
810
jobs:
911
pypi:
1012
name: upload release to PyPI
@@ -19,21 +21,21 @@ jobs:
1921
contents: write
2022

2123
steps:
22-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23-
with:
24-
persist-credentials: false
24+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
with:
26+
persist-credentials: false
2527

26-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
27-
with:
28-
python-version: "3.x"
28+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
29+
with:
30+
python-version: "3.x"
2931

30-
- name: deps
31-
run: python -m pip install -U build
32+
- name: deps
33+
run: python -m pip install -U build
3234

33-
- name: build
34-
run: python -m build
35+
- name: build
36+
run: python -m build
3537

36-
- name: publish
37-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
38-
with:
39-
attestations: true
38+
- name: publish
39+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
40+
with:
41+
attestations: true

.github/workflows/zizmor.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,19 @@ on:
66
pull_request:
77
branches: ["**"]
88

9+
permissions: {}
10+
911
jobs:
1012
zizmor:
11-
name: zizmor latest via PyPI
13+
name: Run zizmor 🌈
1214
runs-on: ubuntu-latest
1315
permissions:
1416
security-events: write
15-
# required for workflows in private repositories
16-
contents: read
17-
actions: read
1817
steps:
1918
- name: Checkout repository
20-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2120
with:
2221
persist-credentials: false
2322

24-
- name: Install the latest version of uv
25-
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
26-
2723
- name: Run zizmor 🌈
28-
run: uvx zizmor --format sarif . > results.sarif
29-
env:
30-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
32-
- name: Upload SARIF file
33-
uses: github/codeql-action/upload-sarif@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.5
34-
with:
35-
sarif_file: results.sarif
36-
category: zizmor
24+
uses: zizmorcore/zizmor-action@5ca5fc7a4779c5263a3ffa0e1f693009994446d1 # v0.1.2

README.md

Lines changed: 1 addition & 1 deletion
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.13.
8+
through 3.14.
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

Lines changed: 1 addition & 1 deletion
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.13.
5+
through 3.14.
66

77
.. note::
88

pyproject.toml

Lines changed: 1 addition & 1 deletion
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.13)."
14+
description = "A list of Python Standard Libraries (2.7 through 3.14)."
1515
readme = "README.md"
1616
license = { file = "LICENSE" }
1717
authors = [{ name = "Jack Maney", email = "[email protected]" }]

stdlib_list/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"3.11",
2121
"3.12",
2222
"3.13",
23+
"3.14",
2324
]
2425

2526
short_versions = [".".join(x.split(".")[:2]) for x in long_versions]
@@ -58,18 +59,17 @@ def stdlib_list(version: str | None = None) -> list[str]:
5859

5960
data = pkgutil.get_data("stdlib_list", module_list_file).decode() # type: ignore[union-attr]
6061

61-
result = [y for y in [x.strip() for x in data.splitlines()] if y]
62+
result = [y for x in data.splitlines() if (y := x.strip())]
6263

6364
return result
6465

6566

6667
@lru_cache(maxsize=16)
67-
def _stdlib_list_with_cache(version: str | None = None) -> list[str]:
68+
def _stdlib_list_with_cache(version: str | None = None) -> frozenset[str]:
6869
"""Internal cached version of `stdlib_list`"""
69-
return stdlib_list(version=version)
70+
return frozenset(stdlib_list(version=version))
7071

7172

72-
@lru_cache(maxsize=256)
7373
def in_stdlib(module_name: str, version: str | None = None) -> bool:
7474
"""
7575
Return a ``bool`` indicating if module ``module_name`` is in the list of stdlib

0 commit comments

Comments
 (0)