From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 14 Oct 2023 10:27:08 +0000 (+0200) Subject: [3.12] remove redundant call to attach_loop in watcher (GH-110847) (#110867) X-Git-Tag: v3.12.1~290 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c56c0502270ebe29461fe5cab3ee4d6111da650;p=thirdparty%2FPython%2Fcpython.git [3.12] remove redundant call to attach_loop in watcher (GH-110847) (#110867) (cherry picked from commit 596589104fe5a4d90cb145b2cc69b71cc9aa9f07) Co-authored-by: Thomas Grainger --- diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index f985f9776ed0..0a618c42d2d2 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -1461,8 +1461,6 @@ class _UnixDefaultEventLoopPolicy(events.BaseDefaultEventLoopPolicy): self._watcher = PidfdChildWatcher() else: self._watcher = ThreadedChildWatcher() - if threading.current_thread() is threading.main_thread(): - self._watcher.attach_loop(self._local._loop) def set_event_loop(self, loop): """Set the event loop.