python / python/cpython

Tests fail when `_interpreters` extension is disabled

Aberta
#148,244 24 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

tests type-bug
Linguagem predominante
Python
Estrelas
77.2k
Forks
35.9k
Métricas de merge de PRs
Métricas de PR pendentes

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece por Lib/test/datetimetester.py, na região de test_concurrent_initialization_subinterpreter, e inspecione como concurrent.futures.InterpreterPoolExecutor depende da extensão _interpreters. Execute o teste afetado com _interpreters desabilitado e, em seguida, verifique se a funcionalidade indisponível é tratada conforme o esperado e se o comando de teste de execução do perfil é concluído sem essa falha.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
build-system, testing-qa
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
62/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.