You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_interpreters has side effects on test_signal #88129
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-04-27.23:51:03.344>created_at=<Date2021-04-27.22:58:44.092>labels= ['tests', '3.10']
title='test_interpreters has side effects on test_signal'updated_at=<Date2021-05-03.18:55:28.123>user='https://github.com/vstinner'
Traceback (most recent call last):
File "C:\vstinner\python\master\lib\signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object
Ran 1 test in 0.004s
FAILED (errors=1)
test test_signal failed
test_signal failed
bpo-41713: Port _signal module to multi-phase init (GH-23355)
Port the _signal extension module to the multi-phase initialization
API (PEP-489).
Co-Authored-By: Mohamed Koubaa <koubaa.m@gmail.com>
Sorry if I'm not supposed to open closed issues, however I believe there's a typo in the whatsnew page for this. In https://docs.python.org/3.10/whatsnew/changelog.html#changelog, the entry for bpo-43963 says "Importing the signal module in a subinterpreter has no longer side effects.", however I believe it should be "Importing the signal module in a subinterpreter no longer has side effects". The only difference is that "has" is moved after "no longer" instead of before.
Activity
vstinner commentedon Apr 27, 2021
vstinner@DESKTOP-DK7VBIL C:\vstinner\python\master>type bisect3
test.test_signal.RaiseSignalTest.test_handler
test.test_interpreters.TestInterpreterAttrs.test_main_id
test.test_interpreters.TestInterpreterClose.test_from_sibling
vstinner@DESKTOP-DK7VBIL C:\vstinner\python\master>python -m test test_interpreters test_signal --matchfile=bisect3 -v
Running Debug|x64 interpreter...
== CPython 3.10.0a7+ (heads/master:6bd9288b80, Apr 27 2021, 22:54:42) [MSC v.1928 64 bit (AMD64)]
== Windows-10-10.0.19042-SP0 little-endian
== cwd: C:\vstinner\python\master\build\test_python_5756æ
== CPU count: 2
== encodings: locale=cp1252, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/2] test_interpreters
test_main_id (test.test_interpreters.TestInterpreterAttrs) ... ok
test_from_sibling (test.test_interpreters.TestInterpreterClose) ... ok
----------------------------------------------------------------------
Ran 2 tests in 0.277s
OK
0:00:00 [2/2] test_signal
test_handler (test.test_signal.RaiseSignalTest) ... ERROR
======================================================================
ERROR: test_handler (test.test_signal.RaiseSignalTest)
----------------------------------------------------------------------
Ran 1 test in 0.004s
FAILED (errors=1)
test test_signal failed
test_signal failed
== Tests result: FAILURE ==
1 test OK.
1 test failed:
test_signal
Total duration: 689 ms
Tests result: FAILURE
vstinner commentedon Apr 27, 2021
See also bpo-43962: "test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error".
vstinner commentedon Apr 27, 2021
See also bpo-43955: "Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt".
vstinner commentedon Apr 27, 2021
This issue is a follow-up of bpo-41713:
commit 7f9b25a
Author: Victor Stinner <vstinner@python.org>
Date: Tue Nov 17 23:28:25 2020 +0100
vstinner commentedon Apr 27, 2021
New changeset a09766d by Victor Stinner in branch 'master':
bpo-43963: Fix import _signal in subinterpreters (GH-25674)
a09766d
vstinner commentedon Apr 28, 2021
New changeset a5e6444 by Victor Stinner in branch 'master':
bpo-43963: Add _signal module state (GH-25676)
a5e6444
Theelgirl commentedon May 3, 2021
Sorry if I'm not supposed to open closed issues, however I believe there's a typo in the whatsnew page for this. In https://docs.python.org/3.10/whatsnew/changelog.html#changelog, the entry for bpo-43963 says "Importing the signal module in a subinterpreter has no longer side effects.", however I believe it should be "Importing the signal module in a subinterpreter no longer has side effects". The only difference is that "has" is moved after "no longer" instead of before.