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
Catch selector remove_writer() calls in Python>=3.9
Fixes#28, fixes#27.
In Python 3.9, selector_events.py stopped internally using the
`add_writer()` and `remove_writer()` public class interface, instead
calling `_add_writer()` and `_remove_writer()`. This was broken upstream
in python/cpython@3a2667d91e3
This meant the `_remove_writer()` call was never unregistering the
QSocketNotifier, as qasync does not override that method. Rather than
crash, the write callback was simply ignoring the duplicate calls,
resulting in 100% CPU.
Cope with this by overriding the internal method names instead. This
looks like it will work at least as far back as Python 3.6. The upstream
Python repository has broken tags somehow so I can't check back further.
0 commit comments