Skip to content

Tests fail when _interpreters extension is disabled #148244

@TrueCat17

Description

@TrueCat17

Bug report

Bug description:

My CPython version: 3.14.4 (problem with 3.14.3 too)

Configure:
./configure --disable-shared --enable-optimizations --without-lto

Select modules:

./Modules/makesetup -c ./Modules/config.c.in -s ./Modules ./Setup.my.local
mv config.c ./Modules/

File (github says *.local file upload is not expected, change ext txt -> local)
Setup.my.txt
As you can see, the _interpreters module is disabled

And make:
make -j4

Error after testing:

...
File ".../Lib/test/datetimetester.py", line 7304, in test_concurrent_initialization_subinterpreter
...
Traceback (most recent call last):
  File "<string>", line 2, in <module>
    from concurrent.futures import InterpreterPoolExecutor
ImportError: cannot import name 'InterpreterPoolExecutor' from 'concurrent.futures'
...
Ran 1098 tests in 10.101s

FAILED (failures=1, skipped=53)
test test_datetime failed
make: *** [Makefile:990: profile-run-stamp] Error 2

I think a test with a non-existent module should be skipped, not crashed
Also, why does a test failure cause the build to fail if these tests are just needed to collect statistics?

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions