Skip to content

Commit 0648d1f

Browse files
committed
Stop configuring watchers for asyncio tests under 3.12+
1 parent 4cc4f91 commit 0648d1f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

uvloop/_testbase.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import select
1414
import socket
1515
import ssl
16+
import sys
1617
import tempfile
1718
import threading
1819
import time
@@ -313,12 +314,14 @@ class AIOTestCase(BaseTestCase):
313314
def setUp(self):
314315
super().setUp()
315316

316-
watcher = asyncio.SafeChildWatcher()
317-
watcher.attach_loop(self.loop)
318-
asyncio.set_child_watcher(watcher)
317+
if sys.version_info < (3, 12):
318+
watcher = asyncio.SafeChildWatcher()
319+
watcher.attach_loop(self.loop)
320+
asyncio.set_child_watcher(watcher)
319321

320322
def tearDown(self):
321-
asyncio.set_child_watcher(None)
323+
if sys.version_info < (3, 12):
324+
asyncio.set_child_watcher(None)
322325
super().tearDown()
323326

324327
def new_loop(self):

0 commit comments

Comments
 (0)