python / python/cpython

Tests fail when `_interpreters` extension is disabled

Đang mở
#148,244 24 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

tests type-bug
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với Lib/test/datetimetester.py tại khu vực quanh test_concurrent_initialization_subinterpreter và kiểm tra cách concurrent.futures.InterpreterPoolExecutor phụ thuộc vào phần mở rộng _interpreters. Chạy bài kiểm thử bị ảnh hưởng khi _interpreters bị vô hiệu hóa, sau đó xác minh rằng chức năng không khả dụng được xử lý như dự kiến và lệnh kiểm thử chạy profile hoàn tất mà không gặp lỗi này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system, testing-qa
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
62/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.