Skip to content

Test hang on 3.9.8+ and upcoming 3.10+ #1839

@jamadden

Description

@jamadden

From #1828 (comment) :

The manifestation in the test suite is that the test that monkey-patches from a non-main thread hangs on 3.9.8 and above when the interpreter tries to exit; you have to kill it with ctrl-C.

$ python -u -mgevent.tests.test__threading_monkey_in_thread
.
----------------------------------------------------------------------
Ran 1 test in 0.236s

OK
^CException ignored in: <module 'threading' from '//3.9/lib/python3.9/threading.py'>
Traceback (most recent call last):
  File "//3.9/lib/python3.9/threading.py", line 1470, in _shutdown
    lock.acquire()
KeyboardInterrupt:

In the past, gevent has had to special-case some things around this, in part to workaround the bug that just got fixed in CPython. But just disabling that workaround doesn't fix the test.

This is probably caused by https://bugs.python.org/issue1596321 (3.9 "fix" is python/cpython#28589, 3.10 is python/cpython#28588)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions