Issue #23485: select.select() is now retried automatically with the recomputed
timeout when interrupted by a signal, except if the signal handler raises an
exception. This change is part of the PEP 475.
The asyncore and selectors module doesn't catch the InterruptedError exception
anymore when calling select.select(), since this function should not raise
InterruptedError anymore.
diff --git a/Lib/selectors.py b/Lib/selectors.py
index 6d569c3..4f2a377 100644
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -310,10 +310,7 @@
def select(self, timeout=None):
timeout = None if timeout is None else max(timeout, 0)
ready = []
- try:
- r, w, _ = self._select(self._readers, self._writers, [], timeout)
- except InterruptedError:
- return ready
+ r, w, _ = self._select(self._readers, self._writers, [], timeout)
r = set(r)
w = set(w)
for fd in r | w: