From 7f9657304ea03b049bacded33713c12db0549e40 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Mon, 8 Jun 2026 08:19:15 -0700 Subject: [PATCH 01/14] Add new github action to test lazy imports all against stdlib. --- .github/workflows/lazy-imports-all.yml | 79 ++++++++++++++++++++++++++ Lib/test/lazy_imports_all_exclude.txt | 40 +++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 .github/workflows/lazy-imports-all.yml create mode 100644 Lib/test/lazy_imports_all_exclude.txt diff --git a/.github/workflows/lazy-imports-all.yml b/.github/workflows/lazy-imports-all.yml new file mode 100644 index 000000000000000..9cbce26e92b544c --- /dev/null +++ b/.github/workflows/lazy-imports-all.yml @@ -0,0 +1,79 @@ +name: Lazy imports all + +# Run the standard library test suite with global lazy imports forced on +# (``PYTHON_LAZY_IMPORTS=all``, equivalent to ``-X lazy_imports=all``). +# +# Modules that are known to fail under lazy imports are listed in +# Lib/test/lazy_imports_all_exclude.txt and skipped here. Remove entries from +# that file as the modules are fixed so this workflow starts guarding them +# against regressions. + +on: + workflow_dispatch: + push: + branches: &branches + - 'main' + - '3.*' + paths-ignore: &paths-ignore + - 'Doc/**' + - 'Misc/**' + - '**/*.md' + - '**/*.rst' + pull_request: + branches: *branches + paths-ignore: *paths-ignore + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + FORCE_COLOR: 1 + +jobs: + lazy-imports: + name: Stdlib tests (lazy imports all) + runs-on: ubuntu-24.04 + timeout-minutes: 60 + env: + PYTHON_LAZY_IMPORTS: all + EXCLUDE_FILE: Lib/test/lazy_imports_all_exclude.txt + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Register gcc problem matcher + run: echo "::add-matcher::.github/problem-matchers/gcc.json" + - name: Install dependencies + run: sudo ./.github/workflows/posix-deps-apt.sh + - name: Configure CPython + run: ./configure --config-cache --with-pydebug + - name: Build CPython + run: make -j4 + - name: Display build info + run: make pythoninfo + - name: Verify lazy imports are fullly enabled + run: ./python -c "import sys; assert sys.flags.lazy_imports == 1, sys.flags.lazy_imports; print('lazy imports all enabled')" + - name: Build test list (all tests minus the known-failing exclusions) + run: | + set -euo pipefail + ./python -m test --list-tests > all_tests.txt + # Strip comments/blank lines from the exclusion file, then drop those + # exact test names (whole-line, fixed-string match) from the run list. + grep -vE '^\s*(#.*)?$' "$EXCLUDE_FILE" > exclude_tests.txt + grep -vxF -f exclude_tests.txt all_tests.txt > run_tests.txt + # Fail loudly if any exclusion entry matched nothing: a stale or + # mistyped name (or a change in `--list-tests` output) would otherwise + # silently stop excluding a module and let it fail the run. + stale=$(comm -23 <(sort -u exclude_tests.txt) <(sort -u all_tests.txt)) + if [ -n "$stale" ]; then + echo "::error::Stale entries in $EXCLUDE_FILE (no longer match 'python -m test --list-tests'); remove or fix them:" + echo "$stale" + exit 1 + fi + echo "Excluding $(wc -l < exclude_tests.txt) module(s); running $(wc -l < run_tests.txt) of $(wc -l < all_tests.txt)." + - name: Run stdlib tests with lazy imports + run: xvfb-run xargs ./python -m test --fast-ci --timeout=900 < run_tests.txt diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt new file mode 100644 index 000000000000000..ec9df3e12301e98 --- /dev/null +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -0,0 +1,40 @@ +# Standard library test modules that currently FAIL under global lazy imports +# (``-X lazy_imports=all`` / ``PYTHON_LAZY_IMPORTS=all``). +# +# The "Lazy Imports All" CI workflow (.github/workflows/lazy-imports-all.yml) runs the +# whole test suite with lazy_imports=all, skipping every module listed +# here. Exclusion is whole-module: a listed module is skipped entirely, so any +# passing tests it contains are not covered until its line is removed. As each +# module is fixed, delete its line so the workflow starts guarding it against +# regressions. +# +# Format: one test name per line, exactly as printed by +# ``python -m test --list-tests``. Lines starting with ``#`` and blank lines +# are ignored. Note that split test packages use a dotted path +# (e.g. test.test_future_stmt.test_future) while ordinary modules use the bare +# name (e.g. test_builtin). + +test.test_inspect.test_inspect +test.test_pydoc.test_pydoc +test___all__ +test__interpreters +test_builtin +test_clinic +test_compileall +test_crossinterp +test_datetime +test_generated_cases +test_idle +test_import +test_importlib +test_interpreters +test_json +test_lazy_import +test_subprocess +test_symtable +test_tools +test_trace +test_typing +test_unittest +test_xmlrpc +test_zipfile From e8d7aed901ebda9760ab67043d1d0e2561924599 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Mon, 8 Jun 2026 10:14:41 -0700 Subject: [PATCH 02/14] Adjust GH Action naming to better match existing checks --- .github/workflows/lazy-imports-all.yml | 6 +++--- Lib/test/lazy_imports_all_exclude.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lazy-imports-all.yml b/.github/workflows/lazy-imports-all.yml index 9cbce26e92b544c..00707fffd0bfaab 100644 --- a/.github/workflows/lazy-imports-all.yml +++ b/.github/workflows/lazy-imports-all.yml @@ -1,6 +1,6 @@ -name: Lazy imports all +name: Tests (Lazy Imports) -# Run the standard library test suite with global lazy imports forced on +# Run the CPython test suite with global lazy imports forced on # (``PYTHON_LAZY_IMPORTS=all``, equivalent to ``-X lazy_imports=all``). # # Modules that are known to fail under lazy imports are listed in @@ -35,7 +35,7 @@ env: jobs: lazy-imports: - name: Stdlib tests (lazy imports all) + name: lazy_imports=all enabled runs-on: ubuntu-24.04 timeout-minutes: 60 env: diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index ec9df3e12301e98..6c40dd4910a7d0e 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -1,4 +1,4 @@ -# Standard library test modules that currently FAIL under global lazy imports +# Test modules that currently FAIL under global lazy imports # (``-X lazy_imports=all`` / ``PYTHON_LAZY_IMPORTS=all``). # # The "Lazy Imports All" CI workflow (.github/workflows/lazy-imports-all.yml) runs the From ac21520a537cc26c0d92909629a81394cebd8487 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Mon, 8 Jun 2026 13:55:33 -0700 Subject: [PATCH 03/14] Address comments for reusability --- .github/workflows/build.yml | 7 +++++++ ....yml => rusable-test-lazy-imports-all.yml} | 20 ++++--------------- 2 files changed, 11 insertions(+), 16 deletions(-) rename .github/workflows/{lazy-imports-all.yml => rusable-test-lazy-imports-all.yml} (89%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47ea859c5fefbb9..11978215c653c88 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -496,6 +496,12 @@ jobs: name: hypothesis-example-db path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/examples/ + test-lazy-imports-all: + name: 'Test Lazy Imports Fully Enabled' + needs: build-context + if: fromJSON(needs.build-context.outputs.run-tests) + uses: ./.github/workflows/reusable-lazy-imports-all.yml + build-asan: name: 'Address sanitizer' runs-on: ${{ matrix.os }} @@ -669,6 +675,7 @@ jobs: - build-emscripten - build-wasi - test-hypothesis + - test-lazy-imports-all - build-asan - build-san - cross-build-linux diff --git a/.github/workflows/lazy-imports-all.yml b/.github/workflows/rusable-test-lazy-imports-all.yml similarity index 89% rename from .github/workflows/lazy-imports-all.yml rename to .github/workflows/rusable-test-lazy-imports-all.yml index 00707fffd0bfaab..ec9de12a2a92119 100644 --- a/.github/workflows/lazy-imports-all.yml +++ b/.github/workflows/rusable-test-lazy-imports-all.yml @@ -1,4 +1,4 @@ -name: Tests (Lazy Imports) +name: Reusable Lazy Imports Tests # Run the CPython test suite with global lazy imports forced on # (``PYTHON_LAZY_IMPORTS=all``, equivalent to ``-X lazy_imports=all``). @@ -9,19 +9,7 @@ name: Tests (Lazy Imports) # against regressions. on: - workflow_dispatch: - push: - branches: &branches - - 'main' - - '3.*' - paths-ignore: &paths-ignore - - 'Doc/**' - - 'Misc/**' - - '**/*.md' - - '**/*.rst' - pull_request: - branches: *branches - paths-ignore: *paths-ignore + workflow_call: permissions: contents: read @@ -34,8 +22,8 @@ env: FORCE_COLOR: 1 jobs: - lazy-imports: - name: lazy_imports=all enabled + test-lazy-imports-all: + name: 'Test Lazy Imports Fully Enabled' runs-on: ubuntu-24.04 timeout-minutes: 60 env: From 4dab14b359ce30bffbea06c34069e96f96bff32e Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Mon, 8 Jun 2026 13:58:38 -0700 Subject: [PATCH 04/14] Fix double typo + add flaky module --- .github/workflows/build.yml | 2 +- ...-lazy-imports-all.yml => reusable-test-lazy-imports-all.yml} | 0 Lib/test/lazy_imports_all_exclude.txt | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) rename .github/workflows/{rusable-test-lazy-imports-all.yml => reusable-test-lazy-imports-all.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11978215c653c88..fc1f84dbd178494 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -500,7 +500,7 @@ jobs: name: 'Test Lazy Imports Fully Enabled' needs: build-context if: fromJSON(needs.build-context.outputs.run-tests) - uses: ./.github/workflows/reusable-lazy-imports-all.yml + uses: ./.github/workflows/reusable-test-lazy-imports-all.yml build-asan: name: 'Address sanitizer' diff --git a/.github/workflows/rusable-test-lazy-imports-all.yml b/.github/workflows/reusable-test-lazy-imports-all.yml similarity index 100% rename from .github/workflows/rusable-test-lazy-imports-all.yml rename to .github/workflows/reusable-test-lazy-imports-all.yml diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index 6c40dd4910a7d0e..b2c9fc865d271ad 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -23,6 +23,7 @@ test_clinic test_compileall test_crossinterp test_datetime +test_external_inspection test_generated_cases test_idle test_import From 4900ef0673fbaf2195d7ac74411787ce807fb785 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Tue, 9 Jun 2026 12:03:41 -0700 Subject: [PATCH 05/14] Update test name --- .github/workflows/build.yml | 2 +- .github/workflows/reusable-test-lazy-imports-all.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc1f84dbd178494..b1f2c673a80a554 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -497,7 +497,7 @@ jobs: path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/examples/ test-lazy-imports-all: - name: 'Test Lazy Imports Fully Enabled' + name: 'Lazy Imports All Enabled' needs: build-context if: fromJSON(needs.build-context.outputs.run-tests) uses: ./.github/workflows/reusable-test-lazy-imports-all.yml diff --git a/.github/workflows/reusable-test-lazy-imports-all.yml b/.github/workflows/reusable-test-lazy-imports-all.yml index ec9de12a2a92119..ad7bf1bf31820ab 100644 --- a/.github/workflows/reusable-test-lazy-imports-all.yml +++ b/.github/workflows/reusable-test-lazy-imports-all.yml @@ -23,7 +23,7 @@ env: jobs: test-lazy-imports-all: - name: 'Test Lazy Imports Fully Enabled' + name: 'Lazy Imports All Enabled' runs-on: ubuntu-24.04 timeout-minutes: 60 env: From 41aec251e02dc4715b26c4809e9487fb33a1db8c Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Tue, 9 Jun 2026 14:42:17 -0700 Subject: [PATCH 06/14] Remove concurrency configeration for reusable-test-lazy-imports-all.yml --- .github/workflows/reusable-test-lazy-imports-all.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/reusable-test-lazy-imports-all.yml b/.github/workflows/reusable-test-lazy-imports-all.yml index ad7bf1bf31820ab..ed018be8d6ff257 100644 --- a/.github/workflows/reusable-test-lazy-imports-all.yml +++ b/.github/workflows/reusable-test-lazy-imports-all.yml @@ -14,10 +14,6 @@ on: permissions: contents: read -concurrency: - group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - env: FORCE_COLOR: 1 From aca93f27847450b0b5080d054788efd34ed16927 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Wed, 10 Jun 2026 14:36:02 -0700 Subject: [PATCH 07/14] bikeshed renames --- .github/workflows/build.yml | 2 +- .github/workflows/reusable-test-lazy-imports-all.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1f2c673a80a554..6e3f930cf110a18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -497,7 +497,7 @@ jobs: path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/examples/ test-lazy-imports-all: - name: 'Lazy Imports All Enabled' + name: 'Lazy imports enabled' needs: build-context if: fromJSON(needs.build-context.outputs.run-tests) uses: ./.github/workflows/reusable-test-lazy-imports-all.yml diff --git a/.github/workflows/reusable-test-lazy-imports-all.yml b/.github/workflows/reusable-test-lazy-imports-all.yml index ed018be8d6ff257..b8ba1995abb7de6 100644 --- a/.github/workflows/reusable-test-lazy-imports-all.yml +++ b/.github/workflows/reusable-test-lazy-imports-all.yml @@ -19,7 +19,7 @@ env: jobs: test-lazy-imports-all: - name: 'Lazy Imports All Enabled' + name: 'Run Tests with lazy_imports=all' runs-on: ubuntu-24.04 timeout-minutes: 60 env: @@ -39,7 +39,7 @@ jobs: run: make -j4 - name: Display build info run: make pythoninfo - - name: Verify lazy imports are fullly enabled + - name: Verify lazy imports are fully enabled run: ./python -c "import sys; assert sys.flags.lazy_imports == 1, sys.flags.lazy_imports; print('lazy imports all enabled')" - name: Build test list (all tests minus the known-failing exclusions) run: | From 05aaad2dac28b635357c4bd504a1e2eb2b37dfbf Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Thu, 11 Jun 2026 06:52:21 -0700 Subject: [PATCH 08/14] Take a swing at adding exclusion checks --- .../reusable-test-lazy-imports-all.yml | 20 ++++++++++++++++++- Lib/test/lazy_imports_all_exclude.txt | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-test-lazy-imports-all.yml b/.github/workflows/reusable-test-lazy-imports-all.yml index b8ba1995abb7de6..2ea62fb624cfb52 100644 --- a/.github/workflows/reusable-test-lazy-imports-all.yml +++ b/.github/workflows/reusable-test-lazy-imports-all.yml @@ -6,7 +6,8 @@ name: Reusable Lazy Imports Tests # Modules that are known to fail under lazy imports are listed in # Lib/test/lazy_imports_all_exclude.txt and skipped here. Remove entries from # that file as the modules are fixed so this workflow starts guarding them -# against regressions. +# against regressions. Excluded modules are also checked separately so the +# workflow fails when one starts passing and its exclusion should be removed. on: workflow_call: @@ -61,3 +62,20 @@ jobs: echo "Excluding $(wc -l < exclude_tests.txt) module(s); running $(wc -l < run_tests.txt) of $(wc -l < all_tests.txt)." - name: Run stdlib tests with lazy imports run: xvfb-run xargs ./python -m test --fast-ci --timeout=900 < run_tests.txt + - name: Verify excluded tests still need exclusion + if: success() + run: | + set -euo pipefail + unexpected_passes=() + while IFS= read -r test_name; do + [ -n "$test_name" ] || continue + echo "Checking excluded test: $test_name" + if xvfb-run ./python -m test --fast-ci --timeout=900 "$test_name"; then + unexpected_passes+=("$test_name") + fi + done < exclude_tests.txt + if [ "${#unexpected_passes[@]}" -ne 0 ]; then + echo "::error::These tests still appear in $EXCLUDE_FILE but now pass with PYTHON_LAZY_IMPORTS=all. Remove them from the exclude file:" + printf '%s\n' "${unexpected_passes[@]}" + exit 1 + fi diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index b2c9fc865d271ad..8dca5a24d8204fe 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -6,7 +6,8 @@ # here. Exclusion is whole-module: a listed module is skipped entirely, so any # passing tests it contains are not covered until its line is removed. As each # module is fixed, delete its line so the workflow starts guarding it against -# regressions. +# regressions. The workflow also checks listed modules separately and fails if +# one now passes, so accidental fixes prompt cleanup of this file. # # Format: one test name per line, exactly as printed by # ``python -m test --list-tests``. Lines starting with ``#`` and blank lines From ccc6992c1d9c01f08687da44e64b8dd2ceb5556a Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Thu, 11 Jun 2026 07:21:03 -0700 Subject: [PATCH 09/14] remove allegedly passing modules? --- Lib/test/lazy_imports_all_exclude.txt | 44 ++++++++++++++------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index 8dca5a24d8204fe..c7f71315b17365a 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -15,28 +15,30 @@ # (e.g. test.test_future_stmt.test_future) while ordinary modules use the bare # name (e.g. test_builtin). -test.test_inspect.test_inspect + test.test_pydoc.test_pydoc -test___all__ -test__interpreters -test_builtin -test_clinic test_compileall -test_crossinterp -test_datetime -test_external_inspection -test_generated_cases -test_idle -test_import -test_importlib test_interpreters -test_json test_lazy_import -test_subprocess -test_symtable -test_tools -test_trace -test_typing -test_unittest -test_xmlrpc -test_zipfile + +#test.test_inspect.test_inspect +#test___all__ +#test__interpreters +#test_builtin +#test_clinic +#test_crossinterp +#test_datetime +#test_external_inspection +#test_generated_cases +#test_idle +#test_import +#test_importlib +#test_json +#test_subprocess +#test_symtable +#test_tools +#test_trace +#test_typing +#test_unittest +#test_xmlrpc +#test_zipfile From c6d590e291b30e5eca5ac1f7dec63eae9c051f40 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Thu, 11 Jun 2026 07:46:22 -0700 Subject: [PATCH 10/14] clean up --- Lib/test/lazy_imports_all_exclude.txt | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index c7f71315b17365a..59e34faab911d88 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -20,25 +20,3 @@ test.test_pydoc.test_pydoc test_compileall test_interpreters test_lazy_import - -#test.test_inspect.test_inspect -#test___all__ -#test__interpreters -#test_builtin -#test_clinic -#test_crossinterp -#test_datetime -#test_external_inspection -#test_generated_cases -#test_idle -#test_import -#test_importlib -#test_json -#test_subprocess -#test_symtable -#test_tools -#test_trace -#test_typing -#test_unittest -#test_xmlrpc -#test_zipfile From a23ebaf25e3efc4fa7953b19a845bdacdc4ce596 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Thu, 11 Jun 2026 10:08:20 -0700 Subject: [PATCH 11/14] Fix bug with env var not flowing through and bring back exclusions --- .../reusable-test-lazy-imports-all.yml | 13 +- Lib/test/lazy_imports_all_exclude.txt | 37 +- all_tests.txt | 505 ++++++++++++++++++ exclude_tests.txt | 25 + run_tests.txt | 480 +++++++++++++++++ 5 files changed, 1045 insertions(+), 15 deletions(-) create mode 100644 all_tests.txt create mode 100644 exclude_tests.txt create mode 100644 run_tests.txt diff --git a/.github/workflows/reusable-test-lazy-imports-all.yml b/.github/workflows/reusable-test-lazy-imports-all.yml index 2ea62fb624cfb52..97413be691a2ff8 100644 --- a/.github/workflows/reusable-test-lazy-imports-all.yml +++ b/.github/workflows/reusable-test-lazy-imports-all.yml @@ -1,7 +1,7 @@ name: Reusable Lazy Imports Tests # Run the CPython test suite with global lazy imports forced on -# (``PYTHON_LAZY_IMPORTS=all``, equivalent to ``-X lazy_imports=all``). +# (``-X lazy_imports=all``). # # Modules that are known to fail under lazy imports are listed in # Lib/test/lazy_imports_all_exclude.txt and skipped here. Remove entries from @@ -24,7 +24,6 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 60 env: - PYTHON_LAZY_IMPORTS: all EXCLUDE_FILE: Lib/test/lazy_imports_all_exclude.txt steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -41,7 +40,7 @@ jobs: - name: Display build info run: make pythoninfo - name: Verify lazy imports are fully enabled - run: ./python -c "import sys; assert sys.flags.lazy_imports == 1, sys.flags.lazy_imports; print('lazy imports all enabled')" + run: ./python -X lazy_imports=all -c "import sys; assert sys.flags.lazy_imports == 1, sys.flags.lazy_imports; print('lazy imports all enabled')" - name: Build test list (all tests minus the known-failing exclusions) run: | set -euo pipefail @@ -60,8 +59,8 @@ jobs: exit 1 fi echo "Excluding $(wc -l < exclude_tests.txt) module(s); running $(wc -l < run_tests.txt) of $(wc -l < all_tests.txt)." - - name: Run stdlib tests with lazy imports - run: xvfb-run xargs ./python -m test --fast-ci --timeout=900 < run_tests.txt + - name: Run tests with lazy imports + run: xvfb-run xargs ./python -X lazy_imports=all -m test --fast-ci --timeout=900 < run_tests.txt - name: Verify excluded tests still need exclusion if: success() run: | @@ -70,12 +69,12 @@ jobs: while IFS= read -r test_name; do [ -n "$test_name" ] || continue echo "Checking excluded test: $test_name" - if xvfb-run ./python -m test --fast-ci --timeout=900 "$test_name"; then + if xvfb-run ./python -X lazy_imports=all -m test --fast-ci --timeout=900 "$test_name"; then unexpected_passes+=("$test_name") fi done < exclude_tests.txt if [ "${#unexpected_passes[@]}" -ne 0 ]; then - echo "::error::These tests still appear in $EXCLUDE_FILE but now pass with PYTHON_LAZY_IMPORTS=all. Remove them from the exclude file:" + echo "::error::These tests still appear in $EXCLUDE_FILE but now pass with -X lazy_imports=all. Remove them from the exclude file:" printf '%s\n' "${unexpected_passes[@]}" exit 1 fi diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index 59e34faab911d88..d6303f32b3a9d06 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -1,13 +1,14 @@ # Test modules that currently FAIL under global lazy imports # (``-X lazy_imports=all`` / ``PYTHON_LAZY_IMPORTS=all``). # -# The "Lazy Imports All" CI workflow (.github/workflows/lazy-imports-all.yml) runs the -# whole test suite with lazy_imports=all, skipping every module listed -# here. Exclusion is whole-module: a listed module is skipped entirely, so any -# passing tests it contains are not covered until its line is removed. As each -# module is fixed, delete its line so the workflow starts guarding it against -# regressions. The workflow also checks listed modules separately and fails if -# one now passes, so accidental fixes prompt cleanup of this file. +# The "Lazy Imports All" CI workflow +# (.github/workflows/reusable-test-lazy-imports-all.yml) runs the whole test +# suite with lazy_imports=all, skipping every module listed here. Exclusion is +# whole-module: a listed module is skipped entirely, so any passing tests it +# contains are not covered until its line is removed. As each module is fixed, +# delete its line so the workflow starts guarding it against regressions. The +# workflow also checks listed modules separately and fails if one now passes, +# so accidental fixes prompt cleanup of this file. # # Format: one test name per line, exactly as printed by # ``python -m test --list-tests``. Lines starting with ``#`` and blank lines @@ -15,8 +16,28 @@ # (e.g. test.test_future_stmt.test_future) while ordinary modules use the bare # name (e.g. test_builtin). - +test.test_inspect.test_inspect test.test_pydoc.test_pydoc +test___all__ +test__interpreters +test_builtin +test_clinic test_compileall +test_crossinterp +test_datetime +test_external_inspection +test_generated_cases +test_idle +test_import +test_importlib test_interpreters +test_json test_lazy_import +test_subprocess +test_symtable +test_tools +test_trace +test_typing +test_unittest +test_xmlrpc +test_zipfile diff --git a/all_tests.txt b/all_tests.txt new file mode 100644 index 000000000000000..8079e2d51dd8aa9 --- /dev/null +++ b/all_tests.txt @@ -0,0 +1,505 @@ +test.test_asyncio.test_base_events +test.test_asyncio.test_buffered_proto +test.test_asyncio.test_context +test.test_asyncio.test_eager_task_factory +test.test_asyncio.test_events +test.test_asyncio.test_free_threading +test.test_asyncio.test_futures +test.test_asyncio.test_futures2 +test.test_asyncio.test_graph +test.test_asyncio.test_locks +test.test_asyncio.test_pep492 +test.test_asyncio.test_proactor_events +test.test_asyncio.test_protocols +test.test_asyncio.test_queues +test.test_asyncio.test_runners +test.test_asyncio.test_selector_events +test.test_asyncio.test_sendfile +test.test_asyncio.test_server +test.test_asyncio.test_server_context +test.test_asyncio.test_sock_lowlevel +test.test_asyncio.test_ssl +test.test_asyncio.test_sslproto +test.test_asyncio.test_staggered +test.test_asyncio.test_streams +test.test_asyncio.test_subprocess +test.test_asyncio.test_taskgroups +test.test_asyncio.test_tasks +test.test_asyncio.test_threads +test.test_asyncio.test_timeouts +test.test_asyncio.test_tools +test.test_asyncio.test_transports +test.test_asyncio.test_unix_events +test.test_asyncio.test_waitfor +test.test_asyncio.test_windows_events +test.test_asyncio.test_windows_utils +test.test_concurrent_futures.test_as_completed +test.test_concurrent_futures.test_deadlock +test.test_concurrent_futures.test_future +test.test_concurrent_futures.test_init +test.test_concurrent_futures.test_interpreter_pool +test.test_concurrent_futures.test_process_pool +test.test_concurrent_futures.test_shutdown +test.test_concurrent_futures.test_thread_pool +test.test_concurrent_futures.test_wait +test.test_future_stmt.test_future +test.test_future_stmt.test_future_flags +test.test_future_stmt.test_future_multiple_features +test.test_future_stmt.test_future_multiple_imports +test.test_future_stmt.test_future_single_import +test.test_gdb.test_backtrace +test.test_gdb.test_cfunction +test.test_gdb.test_cfunction_full +test.test_gdb.test_jit +test.test_gdb.test_misc +test.test_gdb.test_pretty_print +test.test_inspect.test_inspect +test.test_io.test_bufferedio +test.test_io.test_file +test.test_io.test_fileio +test.test_io.test_general +test.test_io.test_largefile +test.test_io.test_memoryio +test.test_io.test_signals +test.test_io.test_textio +test.test_io.test_univnewlines +test.test_multiprocessing_fork.test_manager +test.test_multiprocessing_fork.test_misc +test.test_multiprocessing_fork.test_processes +test.test_multiprocessing_fork.test_threads +test.test_multiprocessing_forkserver.test_manager +test.test_multiprocessing_forkserver.test_misc +test.test_multiprocessing_forkserver.test_preload +test.test_multiprocessing_forkserver.test_processes +test.test_multiprocessing_forkserver.test_threads +test.test_multiprocessing_spawn.test_manager +test.test_multiprocessing_spawn.test_misc +test.test_multiprocessing_spawn.test_processes +test.test_multiprocessing_spawn.test_threads +test.test_os.test_os +test.test_os.test_posix +test.test_os.test_windows +test.test_pydoc.test_pydoc +test___all__ +test__colorize +test__interpchannels +test__interpreters +test__locale +test__opcode +test__osx_support +test_abc +test_abstract_numbers +test_android +test_annotationlib +test_apple +test_argparse +test_array +test_asdl_parser +test_ast +test_asyncgen +test_atexit +test_audit +test_augassign +test_base64 +test_baseexception +test_bdb +test_bigaddrspace +test_bigmem +test_binascii +test_binop +test_bisect +test_bool +test_buffer +test_build_details +test_builtin +test_bytes +test_bz2 +test_c_locale_coercion +test_c_stack_unwind +test_calendar +test_call +test_capi +test_cext +test_charmapcodec +test_class +test_clinic +test_cmath +test_cmd +test_cmd_line +test_cmd_line_script +test_code +test_code_module +test_codeccallbacks +test_codecencodings_cn +test_codecencodings_hk +test_codecencodings_iso2022 +test_codecencodings_jp +test_codecencodings_kr +test_codecencodings_tw +test_codecmaps_cn +test_codecmaps_hk +test_codecmaps_jp +test_codecmaps_kr +test_codecmaps_tw +test_codecs +test_codeop +test_collections +test_colorsys +test_compare +test_compile +test_compileall +test_compiler_assemble +test_compiler_codegen +test_complex +test_configparser +test_contains +test_context +test_contextlib +test_contextlib_async +test_copy +test_copyreg +test_coroutines +test_cppext +test_crossinterp +test_csv +test_ctypes +test_curses +test_dataclasses +test_datetime +test_dbm +test_dbm_dumb +test_dbm_gnu +test_dbm_ndbm +test_dbm_sqlite3 +test_decimal +test_decorators +test_defaultdict +test_deque +test_descr +test_descrtut +test_devpoll +test_dict +test_dictcomps +test_dictviews +test_difflib +test_dis +test_doctest +test_docxmlrpc +test_dtrace +test_dynamic +test_dynamicclassattribute +test_eintr +test_email +test_embed +test_ensurepip +test_enum +test_enumerate +test_eof +test_epoll +test_errno +test_except_star +test_exception_group +test_exception_hierarchy +test_exception_variations +test_exceptions +test_extcall +test_external_inspection +test_faulthandler +test_fcntl +test_file_eintr +test_filecmp +test_fileinput +test_fileutils +test_finalization +test_float +test_flufl +test_fnmatch +test_fork1 +test_format +test_fractions +test_frame +test_free_threading +test_frozen +test_fstring +test_ftplib +test_funcattrs +test_functools +test_gc +test_gc_stats +test_generated_cases +test_generator_stop +test_generators +test_genericalias +test_genericclass +test_genericpath +test_genexps +test_getopt +test_getpass +test_getpath +test_gettext +test_glob +test_global +test_grammar +test_graphlib +test_grp +test_gzip +test_hash +test_hashlib +test_heapq +test_hmac +test_html +test_htmlparser +test_http_cookiejar +test_http_cookies +test_httplib +test_httpservers +test_idle +test_imaplib +test_import +test_importlib +test_index +test_int +test_int_literal +test_interpreters +test_ioctl +test_ipaddress +test_isinstance +test_iter +test_iterlen +test_itertools +test_json +test_keyword +test_keywordonlyarg +test_kqueue +test_launcher +test_lazy_import +test_linecache +test_list +test_listcomps +test_lltrace +test_locale +test_logging +test_long +test_longexp +test_lzma +test_mailbox +test_marshal +test_math +test_math_integer +test_math_property +test_memoryview +test_metaclass +test_mimetypes +test_minidom +test_mmap +test_module +test_modulefinder +test_monitoring +test_msvcrt +test_multibytecodec +test_multiprocessing_main_handling +test_named_expressions +test_netrc +test_ntpath +test_nturl2path +test_numeric_tower +test_opcache +test_opcodes +test_openpty +test_operator +test_optimizer +test_optparse +test_ordered_dict +test_osx_env +test_pathlib +test_patma +test_pdb +test_peepholer +test_peg_generator +test_pep646_syntax +test_perf_profiler +test_perfmaps +test_pickle +test_picklebuffer +test_pickletools +test_pkg +test_pkgutil +test_platform +test_plistlib +test_poll +test_popen +test_poplib +test_positional_only_arg +test_posixpath +test_pow +test_pprint +test_print +test_profile +test_profiling +test_property +test_pstats +test_pty +test_pulldom +test_pwd +test_py_compile +test_pyclbr +test_pyexpat +test_pyrepl +test_pystats +test_queue +test_quopri +test_raise +test_random +test_range +test_re +test_readline +test_regrtest +test_remote_pdb +test_repl +test_reprlib +test_resource +test_richcmp +test_rlcompleter +test_robotparser +test_runpy +test_samply_profiler +test_sax +test_sched +test_scope +test_script_helper +test_secrets +test_select +test_selectors +test_set +test_setcomps +test_shelve +test_shlex +test_shutil +test_signal +test_site +test_slice +test_smtplib +test_smtpnet +test_socket +test_socketserver +test_sort +test_source_encoding +test_sqlite3 +test_ssl +test_stable_abi_ctypes +test_startfile +test_stat +test_statistics +test_str +test_strftime +test_string +test_string_literals +test_stringprep +test_strptime +test_strtod +test_struct +test_structseq +test_subclassinit +test_subprocess +test_sundry +test_super +test_support +test_symtable +test_syntax +test_sys +test_sys_setprofile +test_sys_settrace +test_sysconfig +test_syslog +test_tabnanny +test_tarfile +test_tcl +test_tempfile +test_termios +test_textwrap +test_thread +test_thread_local_bytecode +test_threadedtempfile +test_threading +test_threading_local +test_threadsignals +test_time +test_timeit +test_timeout +test_tkinter +test_tokenize +test_tomllib +test_tools +test_trace +test_traceback +test_tracemalloc +test_tstring +test_ttk +test_ttk_textonly +test_tty +test_tuple +test_turtle +test_type_aliases +test_type_annotations +test_type_cache +test_type_comments +test_type_params +test_typechecks +test_types +test_typing +test_ucn +test_unary +test_unicode_file +test_unicode_file_functions +test_unicode_identifiers +test_unicodedata +test_unittest +test_unpack +test_unpack_ex +test_unparse +test_urllib +test_urllib2 +test_urllib2_localnet +test_urllib2net +test_urllib_response +test_urllibnet +test_urlparse +test_userdict +test_userlist +test_userstring +test_utf8_mode +test_utf8source +test_uuid +test_venv +test_wait3 +test_wait4 +test_warnings +test_wave +test_weakref +test_weakset +test_webbrowser +test_winapi +test_winconsoleio +test_winreg +test_winsound +test_with +test_wmi +test_wsgiref +test_xml +test_xml_dom_minicompat +test_xml_dom_xmlbuilder +test_xml_etree +test_xml_etree_c +test_xmlrpc +test_xpickle +test_xxlimited +test_xxtestfuzz +test_yield_from +test_zipapp +test_zipfile +test_zipfile64 +test_zipimport +test_zipimport_support +test_zlib +test_zoneinfo +test_zstd diff --git a/exclude_tests.txt b/exclude_tests.txt new file mode 100644 index 000000000000000..2759c5b77dd85ec --- /dev/null +++ b/exclude_tests.txt @@ -0,0 +1,25 @@ +test.test_inspect.test_inspect +test.test_pydoc.test_pydoc +test___all__ +test__interpreters +test_builtin +test_clinic +test_compileall +test_crossinterp +test_datetime +test_external_inspection +test_generated_cases +test_idle +test_import +test_importlib +test_interpreters +test_json +test_lazy_import +test_subprocess +test_symtable +test_tools +test_trace +test_typing +test_unittest +test_xmlrpc +test_zipfile diff --git a/run_tests.txt b/run_tests.txt new file mode 100644 index 000000000000000..0da74c8d5f5668c --- /dev/null +++ b/run_tests.txt @@ -0,0 +1,480 @@ +test.test_asyncio.test_base_events +test.test_asyncio.test_buffered_proto +test.test_asyncio.test_context +test.test_asyncio.test_eager_task_factory +test.test_asyncio.test_events +test.test_asyncio.test_free_threading +test.test_asyncio.test_futures +test.test_asyncio.test_futures2 +test.test_asyncio.test_graph +test.test_asyncio.test_locks +test.test_asyncio.test_pep492 +test.test_asyncio.test_proactor_events +test.test_asyncio.test_protocols +test.test_asyncio.test_queues +test.test_asyncio.test_runners +test.test_asyncio.test_selector_events +test.test_asyncio.test_sendfile +test.test_asyncio.test_server +test.test_asyncio.test_server_context +test.test_asyncio.test_sock_lowlevel +test.test_asyncio.test_ssl +test.test_asyncio.test_sslproto +test.test_asyncio.test_staggered +test.test_asyncio.test_streams +test.test_asyncio.test_subprocess +test.test_asyncio.test_taskgroups +test.test_asyncio.test_tasks +test.test_asyncio.test_threads +test.test_asyncio.test_timeouts +test.test_asyncio.test_tools +test.test_asyncio.test_transports +test.test_asyncio.test_unix_events +test.test_asyncio.test_waitfor +test.test_asyncio.test_windows_events +test.test_asyncio.test_windows_utils +test.test_concurrent_futures.test_as_completed +test.test_concurrent_futures.test_deadlock +test.test_concurrent_futures.test_future +test.test_concurrent_futures.test_init +test.test_concurrent_futures.test_interpreter_pool +test.test_concurrent_futures.test_process_pool +test.test_concurrent_futures.test_shutdown +test.test_concurrent_futures.test_thread_pool +test.test_concurrent_futures.test_wait +test.test_future_stmt.test_future +test.test_future_stmt.test_future_flags +test.test_future_stmt.test_future_multiple_features +test.test_future_stmt.test_future_multiple_imports +test.test_future_stmt.test_future_single_import +test.test_gdb.test_backtrace +test.test_gdb.test_cfunction +test.test_gdb.test_cfunction_full +test.test_gdb.test_jit +test.test_gdb.test_misc +test.test_gdb.test_pretty_print +test.test_io.test_bufferedio +test.test_io.test_file +test.test_io.test_fileio +test.test_io.test_general +test.test_io.test_largefile +test.test_io.test_memoryio +test.test_io.test_signals +test.test_io.test_textio +test.test_io.test_univnewlines +test.test_multiprocessing_fork.test_manager +test.test_multiprocessing_fork.test_misc +test.test_multiprocessing_fork.test_processes +test.test_multiprocessing_fork.test_threads +test.test_multiprocessing_forkserver.test_manager +test.test_multiprocessing_forkserver.test_misc +test.test_multiprocessing_forkserver.test_preload +test.test_multiprocessing_forkserver.test_processes +test.test_multiprocessing_forkserver.test_threads +test.test_multiprocessing_spawn.test_manager +test.test_multiprocessing_spawn.test_misc +test.test_multiprocessing_spawn.test_processes +test.test_multiprocessing_spawn.test_threads +test.test_os.test_os +test.test_os.test_posix +test.test_os.test_windows +test__colorize +test__interpchannels +test__locale +test__opcode +test__osx_support +test_abc +test_abstract_numbers +test_android +test_annotationlib +test_apple +test_argparse +test_array +test_asdl_parser +test_ast +test_asyncgen +test_atexit +test_audit +test_augassign +test_base64 +test_baseexception +test_bdb +test_bigaddrspace +test_bigmem +test_binascii +test_binop +test_bisect +test_bool +test_buffer +test_build_details +test_bytes +test_bz2 +test_c_locale_coercion +test_c_stack_unwind +test_calendar +test_call +test_capi +test_cext +test_charmapcodec +test_class +test_cmath +test_cmd +test_cmd_line +test_cmd_line_script +test_code +test_code_module +test_codeccallbacks +test_codecencodings_cn +test_codecencodings_hk +test_codecencodings_iso2022 +test_codecencodings_jp +test_codecencodings_kr +test_codecencodings_tw +test_codecmaps_cn +test_codecmaps_hk +test_codecmaps_jp +test_codecmaps_kr +test_codecmaps_tw +test_codecs +test_codeop +test_collections +test_colorsys +test_compare +test_compile +test_compiler_assemble +test_compiler_codegen +test_complex +test_configparser +test_contains +test_context +test_contextlib +test_contextlib_async +test_copy +test_copyreg +test_coroutines +test_cppext +test_csv +test_ctypes +test_curses +test_dataclasses +test_dbm +test_dbm_dumb +test_dbm_gnu +test_dbm_ndbm +test_dbm_sqlite3 +test_decimal +test_decorators +test_defaultdict +test_deque +test_descr +test_descrtut +test_devpoll +test_dict +test_dictcomps +test_dictviews +test_difflib +test_dis +test_doctest +test_docxmlrpc +test_dtrace +test_dynamic +test_dynamicclassattribute +test_eintr +test_email +test_embed +test_ensurepip +test_enum +test_enumerate +test_eof +test_epoll +test_errno +test_except_star +test_exception_group +test_exception_hierarchy +test_exception_variations +test_exceptions +test_extcall +test_faulthandler +test_fcntl +test_file_eintr +test_filecmp +test_fileinput +test_fileutils +test_finalization +test_float +test_flufl +test_fnmatch +test_fork1 +test_format +test_fractions +test_frame +test_free_threading +test_frozen +test_fstring +test_ftplib +test_funcattrs +test_functools +test_gc +test_gc_stats +test_generator_stop +test_generators +test_genericalias +test_genericclass +test_genericpath +test_genexps +test_getopt +test_getpass +test_getpath +test_gettext +test_glob +test_global +test_grammar +test_graphlib +test_grp +test_gzip +test_hash +test_hashlib +test_heapq +test_hmac +test_html +test_htmlparser +test_http_cookiejar +test_http_cookies +test_httplib +test_httpservers +test_imaplib +test_index +test_int +test_int_literal +test_ioctl +test_ipaddress +test_isinstance +test_iter +test_iterlen +test_itertools +test_keyword +test_keywordonlyarg +test_kqueue +test_launcher +test_linecache +test_list +test_listcomps +test_lltrace +test_locale +test_logging +test_long +test_longexp +test_lzma +test_mailbox +test_marshal +test_math +test_math_integer +test_math_property +test_memoryview +test_metaclass +test_mimetypes +test_minidom +test_mmap +test_module +test_modulefinder +test_monitoring +test_msvcrt +test_multibytecodec +test_multiprocessing_main_handling +test_named_expressions +test_netrc +test_ntpath +test_nturl2path +test_numeric_tower +test_opcache +test_opcodes +test_openpty +test_operator +test_optimizer +test_optparse +test_ordered_dict +test_osx_env +test_pathlib +test_patma +test_pdb +test_peepholer +test_peg_generator +test_pep646_syntax +test_perf_profiler +test_perfmaps +test_pickle +test_picklebuffer +test_pickletools +test_pkg +test_pkgutil +test_platform +test_plistlib +test_poll +test_popen +test_poplib +test_positional_only_arg +test_posixpath +test_pow +test_pprint +test_print +test_profile +test_profiling +test_property +test_pstats +test_pty +test_pulldom +test_pwd +test_py_compile +test_pyclbr +test_pyexpat +test_pyrepl +test_pystats +test_queue +test_quopri +test_raise +test_random +test_range +test_re +test_readline +test_regrtest +test_remote_pdb +test_repl +test_reprlib +test_resource +test_richcmp +test_rlcompleter +test_robotparser +test_runpy +test_samply_profiler +test_sax +test_sched +test_scope +test_script_helper +test_secrets +test_select +test_selectors +test_set +test_setcomps +test_shelve +test_shlex +test_shutil +test_signal +test_site +test_slice +test_smtplib +test_smtpnet +test_socket +test_socketserver +test_sort +test_source_encoding +test_sqlite3 +test_ssl +test_stable_abi_ctypes +test_startfile +test_stat +test_statistics +test_str +test_strftime +test_string +test_string_literals +test_stringprep +test_strptime +test_strtod +test_struct +test_structseq +test_subclassinit +test_sundry +test_super +test_support +test_syntax +test_sys +test_sys_setprofile +test_sys_settrace +test_sysconfig +test_syslog +test_tabnanny +test_tarfile +test_tcl +test_tempfile +test_termios +test_textwrap +test_thread +test_thread_local_bytecode +test_threadedtempfile +test_threading +test_threading_local +test_threadsignals +test_time +test_timeit +test_timeout +test_tkinter +test_tokenize +test_tomllib +test_traceback +test_tracemalloc +test_tstring +test_ttk +test_ttk_textonly +test_tty +test_tuple +test_turtle +test_type_aliases +test_type_annotations +test_type_cache +test_type_comments +test_type_params +test_typechecks +test_types +test_ucn +test_unary +test_unicode_file +test_unicode_file_functions +test_unicode_identifiers +test_unicodedata +test_unpack +test_unpack_ex +test_unparse +test_urllib +test_urllib2 +test_urllib2_localnet +test_urllib2net +test_urllib_response +test_urllibnet +test_urlparse +test_userdict +test_userlist +test_userstring +test_utf8_mode +test_utf8source +test_uuid +test_venv +test_wait3 +test_wait4 +test_warnings +test_wave +test_weakref +test_weakset +test_webbrowser +test_winapi +test_winconsoleio +test_winreg +test_winsound +test_with +test_wmi +test_wsgiref +test_xml +test_xml_dom_minicompat +test_xml_dom_xmlbuilder +test_xml_etree +test_xml_etree_c +test_xpickle +test_xxlimited +test_xxtestfuzz +test_yield_from +test_zipapp +test_zipfile64 +test_zipimport +test_zipimport_support +test_zlib +test_zoneinfo +test_zstd From 4b3f9fbb34eda25c8d25b64062a4202627d610b4 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Thu, 11 Jun 2026 10:11:07 -0700 Subject: [PATCH 12/14] Accidentally added random files --- all_tests.txt | 505 ---------------------------------------------- exclude_tests.txt | 25 --- run_tests.txt | 480 ------------------------------------------- 3 files changed, 1010 deletions(-) delete mode 100644 all_tests.txt delete mode 100644 exclude_tests.txt delete mode 100644 run_tests.txt diff --git a/all_tests.txt b/all_tests.txt deleted file mode 100644 index 8079e2d51dd8aa9..000000000000000 --- a/all_tests.txt +++ /dev/null @@ -1,505 +0,0 @@ -test.test_asyncio.test_base_events -test.test_asyncio.test_buffered_proto -test.test_asyncio.test_context -test.test_asyncio.test_eager_task_factory -test.test_asyncio.test_events -test.test_asyncio.test_free_threading -test.test_asyncio.test_futures -test.test_asyncio.test_futures2 -test.test_asyncio.test_graph -test.test_asyncio.test_locks -test.test_asyncio.test_pep492 -test.test_asyncio.test_proactor_events -test.test_asyncio.test_protocols -test.test_asyncio.test_queues -test.test_asyncio.test_runners -test.test_asyncio.test_selector_events -test.test_asyncio.test_sendfile -test.test_asyncio.test_server -test.test_asyncio.test_server_context -test.test_asyncio.test_sock_lowlevel -test.test_asyncio.test_ssl -test.test_asyncio.test_sslproto -test.test_asyncio.test_staggered -test.test_asyncio.test_streams -test.test_asyncio.test_subprocess -test.test_asyncio.test_taskgroups -test.test_asyncio.test_tasks -test.test_asyncio.test_threads -test.test_asyncio.test_timeouts -test.test_asyncio.test_tools -test.test_asyncio.test_transports -test.test_asyncio.test_unix_events -test.test_asyncio.test_waitfor -test.test_asyncio.test_windows_events -test.test_asyncio.test_windows_utils -test.test_concurrent_futures.test_as_completed -test.test_concurrent_futures.test_deadlock -test.test_concurrent_futures.test_future -test.test_concurrent_futures.test_init -test.test_concurrent_futures.test_interpreter_pool -test.test_concurrent_futures.test_process_pool -test.test_concurrent_futures.test_shutdown -test.test_concurrent_futures.test_thread_pool -test.test_concurrent_futures.test_wait -test.test_future_stmt.test_future -test.test_future_stmt.test_future_flags -test.test_future_stmt.test_future_multiple_features -test.test_future_stmt.test_future_multiple_imports -test.test_future_stmt.test_future_single_import -test.test_gdb.test_backtrace -test.test_gdb.test_cfunction -test.test_gdb.test_cfunction_full -test.test_gdb.test_jit -test.test_gdb.test_misc -test.test_gdb.test_pretty_print -test.test_inspect.test_inspect -test.test_io.test_bufferedio -test.test_io.test_file -test.test_io.test_fileio -test.test_io.test_general -test.test_io.test_largefile -test.test_io.test_memoryio -test.test_io.test_signals -test.test_io.test_textio -test.test_io.test_univnewlines -test.test_multiprocessing_fork.test_manager -test.test_multiprocessing_fork.test_misc -test.test_multiprocessing_fork.test_processes -test.test_multiprocessing_fork.test_threads -test.test_multiprocessing_forkserver.test_manager -test.test_multiprocessing_forkserver.test_misc -test.test_multiprocessing_forkserver.test_preload -test.test_multiprocessing_forkserver.test_processes -test.test_multiprocessing_forkserver.test_threads -test.test_multiprocessing_spawn.test_manager -test.test_multiprocessing_spawn.test_misc -test.test_multiprocessing_spawn.test_processes -test.test_multiprocessing_spawn.test_threads -test.test_os.test_os -test.test_os.test_posix -test.test_os.test_windows -test.test_pydoc.test_pydoc -test___all__ -test__colorize -test__interpchannels -test__interpreters -test__locale -test__opcode -test__osx_support -test_abc -test_abstract_numbers -test_android -test_annotationlib -test_apple -test_argparse -test_array -test_asdl_parser -test_ast -test_asyncgen -test_atexit -test_audit -test_augassign -test_base64 -test_baseexception -test_bdb -test_bigaddrspace -test_bigmem -test_binascii -test_binop -test_bisect -test_bool -test_buffer -test_build_details -test_builtin -test_bytes -test_bz2 -test_c_locale_coercion -test_c_stack_unwind -test_calendar -test_call -test_capi -test_cext -test_charmapcodec -test_class -test_clinic -test_cmath -test_cmd -test_cmd_line -test_cmd_line_script -test_code -test_code_module -test_codeccallbacks -test_codecencodings_cn -test_codecencodings_hk -test_codecencodings_iso2022 -test_codecencodings_jp -test_codecencodings_kr -test_codecencodings_tw -test_codecmaps_cn -test_codecmaps_hk -test_codecmaps_jp -test_codecmaps_kr -test_codecmaps_tw -test_codecs -test_codeop -test_collections -test_colorsys -test_compare -test_compile -test_compileall -test_compiler_assemble -test_compiler_codegen -test_complex -test_configparser -test_contains -test_context -test_contextlib -test_contextlib_async -test_copy -test_copyreg -test_coroutines -test_cppext -test_crossinterp -test_csv -test_ctypes -test_curses -test_dataclasses -test_datetime -test_dbm -test_dbm_dumb -test_dbm_gnu -test_dbm_ndbm -test_dbm_sqlite3 -test_decimal -test_decorators -test_defaultdict -test_deque -test_descr -test_descrtut -test_devpoll -test_dict -test_dictcomps -test_dictviews -test_difflib -test_dis -test_doctest -test_docxmlrpc -test_dtrace -test_dynamic -test_dynamicclassattribute -test_eintr -test_email -test_embed -test_ensurepip -test_enum -test_enumerate -test_eof -test_epoll -test_errno -test_except_star -test_exception_group -test_exception_hierarchy -test_exception_variations -test_exceptions -test_extcall -test_external_inspection -test_faulthandler -test_fcntl -test_file_eintr -test_filecmp -test_fileinput -test_fileutils -test_finalization -test_float -test_flufl -test_fnmatch -test_fork1 -test_format -test_fractions -test_frame -test_free_threading -test_frozen -test_fstring -test_ftplib -test_funcattrs -test_functools -test_gc -test_gc_stats -test_generated_cases -test_generator_stop -test_generators -test_genericalias -test_genericclass -test_genericpath -test_genexps -test_getopt -test_getpass -test_getpath -test_gettext -test_glob -test_global -test_grammar -test_graphlib -test_grp -test_gzip -test_hash -test_hashlib -test_heapq -test_hmac -test_html -test_htmlparser -test_http_cookiejar -test_http_cookies -test_httplib -test_httpservers -test_idle -test_imaplib -test_import -test_importlib -test_index -test_int -test_int_literal -test_interpreters -test_ioctl -test_ipaddress -test_isinstance -test_iter -test_iterlen -test_itertools -test_json -test_keyword -test_keywordonlyarg -test_kqueue -test_launcher -test_lazy_import -test_linecache -test_list -test_listcomps -test_lltrace -test_locale -test_logging -test_long -test_longexp -test_lzma -test_mailbox -test_marshal -test_math -test_math_integer -test_math_property -test_memoryview -test_metaclass -test_mimetypes -test_minidom -test_mmap -test_module -test_modulefinder -test_monitoring -test_msvcrt -test_multibytecodec -test_multiprocessing_main_handling -test_named_expressions -test_netrc -test_ntpath -test_nturl2path -test_numeric_tower -test_opcache -test_opcodes -test_openpty -test_operator -test_optimizer -test_optparse -test_ordered_dict -test_osx_env -test_pathlib -test_patma -test_pdb -test_peepholer -test_peg_generator -test_pep646_syntax -test_perf_profiler -test_perfmaps -test_pickle -test_picklebuffer -test_pickletools -test_pkg -test_pkgutil -test_platform -test_plistlib -test_poll -test_popen -test_poplib -test_positional_only_arg -test_posixpath -test_pow -test_pprint -test_print -test_profile -test_profiling -test_property -test_pstats -test_pty -test_pulldom -test_pwd -test_py_compile -test_pyclbr -test_pyexpat -test_pyrepl -test_pystats -test_queue -test_quopri -test_raise -test_random -test_range -test_re -test_readline -test_regrtest -test_remote_pdb -test_repl -test_reprlib -test_resource -test_richcmp -test_rlcompleter -test_robotparser -test_runpy -test_samply_profiler -test_sax -test_sched -test_scope -test_script_helper -test_secrets -test_select -test_selectors -test_set -test_setcomps -test_shelve -test_shlex -test_shutil -test_signal -test_site -test_slice -test_smtplib -test_smtpnet -test_socket -test_socketserver -test_sort -test_source_encoding -test_sqlite3 -test_ssl -test_stable_abi_ctypes -test_startfile -test_stat -test_statistics -test_str -test_strftime -test_string -test_string_literals -test_stringprep -test_strptime -test_strtod -test_struct -test_structseq -test_subclassinit -test_subprocess -test_sundry -test_super -test_support -test_symtable -test_syntax -test_sys -test_sys_setprofile -test_sys_settrace -test_sysconfig -test_syslog -test_tabnanny -test_tarfile -test_tcl -test_tempfile -test_termios -test_textwrap -test_thread -test_thread_local_bytecode -test_threadedtempfile -test_threading -test_threading_local -test_threadsignals -test_time -test_timeit -test_timeout -test_tkinter -test_tokenize -test_tomllib -test_tools -test_trace -test_traceback -test_tracemalloc -test_tstring -test_ttk -test_ttk_textonly -test_tty -test_tuple -test_turtle -test_type_aliases -test_type_annotations -test_type_cache -test_type_comments -test_type_params -test_typechecks -test_types -test_typing -test_ucn -test_unary -test_unicode_file -test_unicode_file_functions -test_unicode_identifiers -test_unicodedata -test_unittest -test_unpack -test_unpack_ex -test_unparse -test_urllib -test_urllib2 -test_urllib2_localnet -test_urllib2net -test_urllib_response -test_urllibnet -test_urlparse -test_userdict -test_userlist -test_userstring -test_utf8_mode -test_utf8source -test_uuid -test_venv -test_wait3 -test_wait4 -test_warnings -test_wave -test_weakref -test_weakset -test_webbrowser -test_winapi -test_winconsoleio -test_winreg -test_winsound -test_with -test_wmi -test_wsgiref -test_xml -test_xml_dom_minicompat -test_xml_dom_xmlbuilder -test_xml_etree -test_xml_etree_c -test_xmlrpc -test_xpickle -test_xxlimited -test_xxtestfuzz -test_yield_from -test_zipapp -test_zipfile -test_zipfile64 -test_zipimport -test_zipimport_support -test_zlib -test_zoneinfo -test_zstd diff --git a/exclude_tests.txt b/exclude_tests.txt deleted file mode 100644 index 2759c5b77dd85ec..000000000000000 --- a/exclude_tests.txt +++ /dev/null @@ -1,25 +0,0 @@ -test.test_inspect.test_inspect -test.test_pydoc.test_pydoc -test___all__ -test__interpreters -test_builtin -test_clinic -test_compileall -test_crossinterp -test_datetime -test_external_inspection -test_generated_cases -test_idle -test_import -test_importlib -test_interpreters -test_json -test_lazy_import -test_subprocess -test_symtable -test_tools -test_trace -test_typing -test_unittest -test_xmlrpc -test_zipfile diff --git a/run_tests.txt b/run_tests.txt deleted file mode 100644 index 0da74c8d5f5668c..000000000000000 --- a/run_tests.txt +++ /dev/null @@ -1,480 +0,0 @@ -test.test_asyncio.test_base_events -test.test_asyncio.test_buffered_proto -test.test_asyncio.test_context -test.test_asyncio.test_eager_task_factory -test.test_asyncio.test_events -test.test_asyncio.test_free_threading -test.test_asyncio.test_futures -test.test_asyncio.test_futures2 -test.test_asyncio.test_graph -test.test_asyncio.test_locks -test.test_asyncio.test_pep492 -test.test_asyncio.test_proactor_events -test.test_asyncio.test_protocols -test.test_asyncio.test_queues -test.test_asyncio.test_runners -test.test_asyncio.test_selector_events -test.test_asyncio.test_sendfile -test.test_asyncio.test_server -test.test_asyncio.test_server_context -test.test_asyncio.test_sock_lowlevel -test.test_asyncio.test_ssl -test.test_asyncio.test_sslproto -test.test_asyncio.test_staggered -test.test_asyncio.test_streams -test.test_asyncio.test_subprocess -test.test_asyncio.test_taskgroups -test.test_asyncio.test_tasks -test.test_asyncio.test_threads -test.test_asyncio.test_timeouts -test.test_asyncio.test_tools -test.test_asyncio.test_transports -test.test_asyncio.test_unix_events -test.test_asyncio.test_waitfor -test.test_asyncio.test_windows_events -test.test_asyncio.test_windows_utils -test.test_concurrent_futures.test_as_completed -test.test_concurrent_futures.test_deadlock -test.test_concurrent_futures.test_future -test.test_concurrent_futures.test_init -test.test_concurrent_futures.test_interpreter_pool -test.test_concurrent_futures.test_process_pool -test.test_concurrent_futures.test_shutdown -test.test_concurrent_futures.test_thread_pool -test.test_concurrent_futures.test_wait -test.test_future_stmt.test_future -test.test_future_stmt.test_future_flags -test.test_future_stmt.test_future_multiple_features -test.test_future_stmt.test_future_multiple_imports -test.test_future_stmt.test_future_single_import -test.test_gdb.test_backtrace -test.test_gdb.test_cfunction -test.test_gdb.test_cfunction_full -test.test_gdb.test_jit -test.test_gdb.test_misc -test.test_gdb.test_pretty_print -test.test_io.test_bufferedio -test.test_io.test_file -test.test_io.test_fileio -test.test_io.test_general -test.test_io.test_largefile -test.test_io.test_memoryio -test.test_io.test_signals -test.test_io.test_textio -test.test_io.test_univnewlines -test.test_multiprocessing_fork.test_manager -test.test_multiprocessing_fork.test_misc -test.test_multiprocessing_fork.test_processes -test.test_multiprocessing_fork.test_threads -test.test_multiprocessing_forkserver.test_manager -test.test_multiprocessing_forkserver.test_misc -test.test_multiprocessing_forkserver.test_preload -test.test_multiprocessing_forkserver.test_processes -test.test_multiprocessing_forkserver.test_threads -test.test_multiprocessing_spawn.test_manager -test.test_multiprocessing_spawn.test_misc -test.test_multiprocessing_spawn.test_processes -test.test_multiprocessing_spawn.test_threads -test.test_os.test_os -test.test_os.test_posix -test.test_os.test_windows -test__colorize -test__interpchannels -test__locale -test__opcode -test__osx_support -test_abc -test_abstract_numbers -test_android -test_annotationlib -test_apple -test_argparse -test_array -test_asdl_parser -test_ast -test_asyncgen -test_atexit -test_audit -test_augassign -test_base64 -test_baseexception -test_bdb -test_bigaddrspace -test_bigmem -test_binascii -test_binop -test_bisect -test_bool -test_buffer -test_build_details -test_bytes -test_bz2 -test_c_locale_coercion -test_c_stack_unwind -test_calendar -test_call -test_capi -test_cext -test_charmapcodec -test_class -test_cmath -test_cmd -test_cmd_line -test_cmd_line_script -test_code -test_code_module -test_codeccallbacks -test_codecencodings_cn -test_codecencodings_hk -test_codecencodings_iso2022 -test_codecencodings_jp -test_codecencodings_kr -test_codecencodings_tw -test_codecmaps_cn -test_codecmaps_hk -test_codecmaps_jp -test_codecmaps_kr -test_codecmaps_tw -test_codecs -test_codeop -test_collections -test_colorsys -test_compare -test_compile -test_compiler_assemble -test_compiler_codegen -test_complex -test_configparser -test_contains -test_context -test_contextlib -test_contextlib_async -test_copy -test_copyreg -test_coroutines -test_cppext -test_csv -test_ctypes -test_curses -test_dataclasses -test_dbm -test_dbm_dumb -test_dbm_gnu -test_dbm_ndbm -test_dbm_sqlite3 -test_decimal -test_decorators -test_defaultdict -test_deque -test_descr -test_descrtut -test_devpoll -test_dict -test_dictcomps -test_dictviews -test_difflib -test_dis -test_doctest -test_docxmlrpc -test_dtrace -test_dynamic -test_dynamicclassattribute -test_eintr -test_email -test_embed -test_ensurepip -test_enum -test_enumerate -test_eof -test_epoll -test_errno -test_except_star -test_exception_group -test_exception_hierarchy -test_exception_variations -test_exceptions -test_extcall -test_faulthandler -test_fcntl -test_file_eintr -test_filecmp -test_fileinput -test_fileutils -test_finalization -test_float -test_flufl -test_fnmatch -test_fork1 -test_format -test_fractions -test_frame -test_free_threading -test_frozen -test_fstring -test_ftplib -test_funcattrs -test_functools -test_gc -test_gc_stats -test_generator_stop -test_generators -test_genericalias -test_genericclass -test_genericpath -test_genexps -test_getopt -test_getpass -test_getpath -test_gettext -test_glob -test_global -test_grammar -test_graphlib -test_grp -test_gzip -test_hash -test_hashlib -test_heapq -test_hmac -test_html -test_htmlparser -test_http_cookiejar -test_http_cookies -test_httplib -test_httpservers -test_imaplib -test_index -test_int -test_int_literal -test_ioctl -test_ipaddress -test_isinstance -test_iter -test_iterlen -test_itertools -test_keyword -test_keywordonlyarg -test_kqueue -test_launcher -test_linecache -test_list -test_listcomps -test_lltrace -test_locale -test_logging -test_long -test_longexp -test_lzma -test_mailbox -test_marshal -test_math -test_math_integer -test_math_property -test_memoryview -test_metaclass -test_mimetypes -test_minidom -test_mmap -test_module -test_modulefinder -test_monitoring -test_msvcrt -test_multibytecodec -test_multiprocessing_main_handling -test_named_expressions -test_netrc -test_ntpath -test_nturl2path -test_numeric_tower -test_opcache -test_opcodes -test_openpty -test_operator -test_optimizer -test_optparse -test_ordered_dict -test_osx_env -test_pathlib -test_patma -test_pdb -test_peepholer -test_peg_generator -test_pep646_syntax -test_perf_profiler -test_perfmaps -test_pickle -test_picklebuffer -test_pickletools -test_pkg -test_pkgutil -test_platform -test_plistlib -test_poll -test_popen -test_poplib -test_positional_only_arg -test_posixpath -test_pow -test_pprint -test_print -test_profile -test_profiling -test_property -test_pstats -test_pty -test_pulldom -test_pwd -test_py_compile -test_pyclbr -test_pyexpat -test_pyrepl -test_pystats -test_queue -test_quopri -test_raise -test_random -test_range -test_re -test_readline -test_regrtest -test_remote_pdb -test_repl -test_reprlib -test_resource -test_richcmp -test_rlcompleter -test_robotparser -test_runpy -test_samply_profiler -test_sax -test_sched -test_scope -test_script_helper -test_secrets -test_select -test_selectors -test_set -test_setcomps -test_shelve -test_shlex -test_shutil -test_signal -test_site -test_slice -test_smtplib -test_smtpnet -test_socket -test_socketserver -test_sort -test_source_encoding -test_sqlite3 -test_ssl -test_stable_abi_ctypes -test_startfile -test_stat -test_statistics -test_str -test_strftime -test_string -test_string_literals -test_stringprep -test_strptime -test_strtod -test_struct -test_structseq -test_subclassinit -test_sundry -test_super -test_support -test_syntax -test_sys -test_sys_setprofile -test_sys_settrace -test_sysconfig -test_syslog -test_tabnanny -test_tarfile -test_tcl -test_tempfile -test_termios -test_textwrap -test_thread -test_thread_local_bytecode -test_threadedtempfile -test_threading -test_threading_local -test_threadsignals -test_time -test_timeit -test_timeout -test_tkinter -test_tokenize -test_tomllib -test_traceback -test_tracemalloc -test_tstring -test_ttk -test_ttk_textonly -test_tty -test_tuple -test_turtle -test_type_aliases -test_type_annotations -test_type_cache -test_type_comments -test_type_params -test_typechecks -test_types -test_ucn -test_unary -test_unicode_file -test_unicode_file_functions -test_unicode_identifiers -test_unicodedata -test_unpack -test_unpack_ex -test_unparse -test_urllib -test_urllib2 -test_urllib2_localnet -test_urllib2net -test_urllib_response -test_urllibnet -test_urlparse -test_userdict -test_userlist -test_userstring -test_utf8_mode -test_utf8source -test_uuid -test_venv -test_wait3 -test_wait4 -test_warnings -test_wave -test_weakref -test_weakset -test_webbrowser -test_winapi -test_winconsoleio -test_winreg -test_winsound -test_with -test_wmi -test_wsgiref -test_xml -test_xml_dom_minicompat -test_xml_dom_xmlbuilder -test_xml_etree -test_xml_etree_c -test_xpickle -test_xxlimited -test_xxtestfuzz -test_yield_from -test_zipapp -test_zipfile64 -test_zipimport -test_zipimport_support -test_zlib -test_zoneinfo -test_zstd From 9a053f85fe16a6510d1d67ae2dd8d4e17e23b03e Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Thu, 11 Jun 2026 10:24:57 -0700 Subject: [PATCH 13/14] Add more modules --- Lib/test/lazy_imports_all_exclude.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index d6303f32b3a9d06..63075e437c1163d 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -27,17 +27,24 @@ test_crossinterp test_datetime test_external_inspection test_generated_cases +test_heapq test_idle test_import test_importlib test_interpreters test_json test_lazy_import +test_pkg +test_profile +test_profiling +test_pyrepl test_subprocess test_symtable test_tools test_trace +test_type_annotations test_typing test_unittest test_xmlrpc test_zipfile +test_zoneinfo From 99c827b1c9b7cef6155a38a425be4dab0ef7da03 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Thu, 11 Jun 2026 11:14:52 -0700 Subject: [PATCH 14/14] Address incorrect exclusions --- Lib/test/lazy_imports_all_exclude.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index 63075e437c1163d..4a169bc089819a0 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -17,23 +17,18 @@ # name (e.g. test_builtin). test.test_inspect.test_inspect -test.test_pydoc.test_pydoc test___all__ test__interpreters test_builtin test_clinic -test_compileall test_crossinterp test_datetime -test_external_inspection test_generated_cases test_heapq test_idle test_import test_importlib -test_interpreters test_json -test_lazy_import test_pkg test_profile test_profiling @@ -43,8 +38,5 @@ test_symtable test_tools test_trace test_type_annotations -test_typing test_unittest -test_xmlrpc -test_zipfile test_zoneinfo