summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/proactor_events.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2022-09-17 21:12:45 (GMT)
committerGitHub <noreply@github.com>2022-09-17 21:12:45 (GMT)
commit487135a396a504482ae3a7e9c7f80a44627a5a3f (patch)
treeecd59a74af59759d07477126b7e8a340274c6ec4 /Lib/asyncio/proactor_events.py
parent7e36abbb7815b14777c207dba0fe6fcd41d6d37a (diff)
downloadcpython-487135a396a504482ae3a7e9c7f80a44627a5a3f.zip
cpython-487135a396a504482ae3a7e9c7f80a44627a5a3f.tar.gz
cpython-487135a396a504482ae3a7e9c7f80a44627a5a3f.tar.bz2
Revert "gh-87079: Warn on unintended signal wakeup fd override in `asyncio` (#96807)" (#96898)
This reverts commit 05878106989c6f5b9dd35a6c15a21bee59312827. Reason: This broke buildbots (some warnings added by that commit are turned to errors in the SSL buildbot). Repro: ./python Lib/test/ssltests.py
Diffstat (limited to 'Lib/asyncio/proactor_events.py')
-rw-r--r--Lib/asyncio/proactor_events.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index 4808c5d..ddb9dac 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -635,12 +635,7 @@ class BaseProactorEventLoop(base_events.BaseEventLoop):
self._make_self_pipe()
if threading.current_thread() is threading.main_thread():
# wakeup fd can only be installed to a file descriptor from the main thread
- oldfd = signal.set_wakeup_fd(self._csock.fileno())
- if oldfd != -1:
- warnings.warn(
- "Signal wakeup fd was already set",
- ResourceWarning,
- source=self)
+ signal.set_wakeup_fd(self._csock.fileno())
def _make_socket_transport(self, sock, protocol, waiter=None,
extra=None, server=None):
@@ -689,12 +684,7 @@ class BaseProactorEventLoop(base_events.BaseEventLoop):
return
if threading.current_thread() is threading.main_thread():
- oldfd = signal.set_wakeup_fd(-1)
- if oldfd != self._csock.fileno():
- warnings.warn(
- "Got unexpected signal wakeup fd",
- ResourceWarning,
- source=self)
+ signal.set_wakeup_fd(-1)
# Call these methods before closing the event loop (before calling
# BaseEventLoop.close), because they can schedule callbacks with
# call_soon(), which is forbidden when the event loop is closed.