Skip to content

Commit 29cddbd

Browse files
authored
fix(uvloop): do not throw w/ uvloop on Python 3.7 (#594)
1 parent 03e5cd0 commit 29cddbd

File tree

2 files changed

+6
-85
lines changed

2 files changed

+6
-85
lines changed

client.py

Lines changed: 0 additions & 84 deletions
This file was deleted.

playwright/_impl/_driver.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@ def compute_driver_executable() -> Path:
3636
# Prevent Python 3.7 from throwing on Linux:
3737
# RuntimeError: Cannot add child handler, the child watcher does not have a loop attached
3838
asyncio.get_event_loop()
39-
asyncio.get_child_watcher()
39+
try:
40+
asyncio.get_child_watcher()
41+
except Exception:
42+
# uvloop does not support child watcher
43+
# see https://github.com/microsoft/playwright-python/issues/582
44+
pass

0 commit comments

Comments
 (0)