cpython
cpython copied to clipboard
concurrent/futures/process.py: mp.util.debug is called, but mp.util is never imported
Bug report
In Lib/concurrent/futures/process.py, mp.util.debug is called, but mp.util is never imported.
This leads to the following:
Exception ignored in: <function _ExecutorManagerThread.__init__.<locals>.weakref_cb at 0x----------->
Traceback (most recent call last):
File "python3.10/concurrent/futures/process.py", line 288, in weakref_cb
AttributeError: 'NoneType' object has no attribute 'util'
My environment is Python 3.10, but this bug exists in the latest cpython.
My impression is that this is relic debug code (but if it is not, non-working code is not helpful). I am about to make a PR removing this debug code.
- PR: gh-99369