Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: Actually raising an exception in PyErr_WarnEx() is not an error, but a standard behavior with corresponding configuration.
For now running tests with -We in debug build crashes. $ ./python -We -m test test_gc Run tests sequentially 0:00:00 load avg: 0.33 [1/1] test_gc Fatal Python error: a function returned a result with an error set RuntimeWarning: Garbage collector enabled while another thread is inside gc.ensure_enabled The above exception was the direct cause of the following exception: SystemError: <built-in method __exit__ of gc.ensure_disabled object at 0x7fb1b62a08f8> returned a result with an error set Thread 0x00007fb1b1773700 (most recent call first): File "/home/serhiy/py/cpython/Lib/test/test_gc.py", line 1050 in disabling_thread File "/home/serhiy/py/cpython/Lib/threading.py", line 865 in run File "/home/serhiy/py/cpython/Lib/threading.py", line 917 in _bootstrap_inner File "/home/serhiy/py/cpython/Lib/threading.py", line 885 in _bootstrap Current thread 0x00007fb1b824f040 (most recent call first): File "/home/serhiy/py/cpython/Lib/test/test_gc.py", line 1061 in test_ensure_disabled_thread File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 2083 in decorator File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 615 in run File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 663 in __call__ File "/home/serhiy/py/cpython/Lib/unittest/suite.py", line 122 in run File "/home/serhiy/py/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/serhiy/py/cpython/Lib/unittest/suite.py", line 122 in run File "/home/serhiy/py/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1760 in run File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1861 in _run_suite File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1951 in run_unittest File "/home/serhiy/py/cpython/Lib/test/test_gc.py", line 1088 in test_main File "/home/serhiy/py/cpython/Lib/test/libregrtest/runtest.py", line 176 in runtest_inner File "/home/serhiy/py/cpython/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/home/serhiy/py/cpython/Lib/test/libregrtest/main.py", line 379 in run_tests_sequential File "/home/serhiy/py/cpython/Lib/test/libregrtest/main.py", line 458 in run_tests File "/home/serhiy/py/cpython/Lib/test/libregrtest/main.py", line 536 in _main File "/home/serhiy/py/cpython/Lib/test/libregrtest/main.py", line 510 in main File "/home/serhiy/py/cpython/Lib/test/libregrtest/main.py", line 585 in main File "/home/serhiy/py/cpython/Lib/test/__main__.py", line 2 in <module> File "/home/serhiy/py/cpython/Lib/runpy.py", line 85 in _run_code File "/home/serhiy/py/cpython/Lib/runpy.py", line 193 in _run_module_as_main Aborted (core dumped) ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31356> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com