From 6f6b3a90421e5e7b231c13be9447e0041ea63a92 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Wed, 5 Nov 2025 14:56:02 -0500 Subject: [PATCH 1/2] chore: drop Python 3.9 support Signed-off-by: William Woodruff --- .github/workflows/ci.yml | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf470d9..cd1aab1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,6 @@ jobs: strategy: matrix: python: - - "3.9" - "3.10" - "3.11" - "3.12" diff --git a/pyproject.toml b/pyproject.toml index df13768..41771d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [] -requires-python = ">=3.9" +requires-python = ">=3.10" [project.urls] Homepage = "https://pypi.org/project/stdlib-list/" From 7f0fe670a536dcd54965af10d1bd0002b25249d1 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Wed, 5 Nov 2025 14:57:55 -0500 Subject: [PATCH 2/2] remove old list support code Signed-off-by: William Woodruff --- .github/workflows/listgen.yml | 96 ----------------------------------- pyproject.toml | 2 - support/fetch-sphinx.py | 13 ----- 3 files changed, 111 deletions(-) delete mode 100755 support/fetch-sphinx.py diff --git a/.github/workflows/listgen.yml b/.github/workflows/listgen.yml index a4719cc..3ba546d 100644 --- a/.github/workflows/listgen.yml +++ b/.github/workflows/listgen.yml @@ -13,102 +13,6 @@ on: permissions: {} jobs: - pre-list-legacy: - strategy: - matrix: - python: - - "3.9" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - persist-credentials: false - - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - # NOTE: matrix.python is intentionally not used here. - python-version: "3.x" - - - name: support deps - run: make dev INSTALL_EXTRA=support - - - name: build pre-list - env: - LISTGEN_PYTHON_VERSION: "${{ matrix.python }}" - run: | - ./env/bin/python ./support/fetch-sphinx.py "${LISTGEN_PYTHON_VERSION}" > pre-list.txt - - - name: upload pre-list - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: pre-list-${{ matrix.python }} - path: pre-list.txt - - expand-list-legacy: - needs: pre-list-legacy - strategy: - matrix: - python: - # - "3.7" # EOL - # - "3.8" # EOL - - "3.9" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - persist-credentials: false - - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ matrix.python }} - - - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - name: pre-list-${{ matrix.python }} - - - name: walk modules - env: - LISTGEN_PYTHON_VERSION: ${{ matrix.python }} - LISTGEN_DRY_RUN: ${{ inputs.dry-run }} - run: | - python ./support/walk-modules.py "${LISTGEN_PYTHON_VERSION}.txt" < pre-list.txt - rm pre-list.txt - - if [[ -f "./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt"" ]]; then - sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \ - ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \ - "${LISTGEN_PYTHON_VERSION}.txt" - else - sort -u -o ./stdlib_list/lists/"${LISTGEN_PYTHON_VERSION}.txt" \ - "${LISTGEN_PYTHON_VERSION}.txt" - fi - - rm "${LISTGEN_PYTHON_VERSION}.txt" - - if [[ "${LISTGEN_DRY_RUN}" == "true" ]]; then - git diff - fi - - - name: create PR - if: ${{ !inputs.dry-run }} - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 - with: - commit-message: "[BOT] update list for ${{ matrix.python }}" - branch: update-stdlib-list-${{ matrix.python }} - base: main - branch-suffix: timestamp - title: "[BOT] update list for ${{ matrix.python }}" - body: | - This is an automated pull request, updating `${{ matrix.python }}.txt` after a detected change. - - Please review manually before merging. - assignees: "woodruffw" - reviewers: "woodruffw" - expand-list: strategy: matrix: diff --git a/pyproject.toml b/pyproject.toml index 41771d0..5681d63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,8 +37,6 @@ test = ["pytest", "pytest-cov", "coverage[toml]"] lint = ["mypy", "ruff"] doc = ["sphinx", "furo"] dev = ["build", "stdlib-list[test,lint,doc]"] -# CI only: used for list generation for Python versions < 3.10. -support = ["sphobjinv"] [tool.mypy] allow_redefinition = true diff --git a/support/fetch-sphinx.py b/support/fetch-sphinx.py deleted file mode 100755 index 7398c18..0000000 --- a/support/fetch-sphinx.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python - -# fetch-sphinx.py: retrieve a particular Python version's stdlib list -# using its hosted Sphinx inventory. - -import sys -import sphobjinv as soi - -if __name__ == "__main__": - vers = sys.argv[1] - inv = soi.Inventory(url=f"https://docs.python.org/{vers}/objects.inv") - modules = list(sorted(obj.name for obj in inv.objects if obj.role == "module")) - print("\n".join(modules))