From 20e4d9eee50f167dd7825a2d70088f16ee588804 Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Tue, 24 Aug 2021 20:34:25 +0530 Subject: [PATCH] docs(python): mention loop compatibility (#8403) --- docs/src/intro-python.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/src/intro-python.md b/docs/src/intro-python.md index eaa930b3c7..fcb34d6264 100644 --- a/docs/src/intro-python.md +++ b/docs/src/intro-python.md @@ -182,6 +182,13 @@ It is recommended to only bundle the browsers you use. You should use `page.wait_for_timeout(5000)` instead of `time.sleep(5)` and it is better to not wait for a timeout at all, but sometimes it is useful for debugging. In these cases, use our wait method instead of the `time` module. This is because we internally rely on asynchronous operations and when using `time.sleep(5)` they can't get processed correctly. + +### incompatible with `SelectorEventLoop` of `asyncio` on Windows + +Playwright runs the driver in a subprocess, so it requires `ProactorEventLoop` of `asyncio` on Windows because `SelectorEventLoop` does not supports async subprocesses. + +On Windows Python 3.7, Playwright sets the default event loop to `ProactorEventLoop` as it is default on Python 3.8+. + ## System requirements Playwright requires Python 3.7 or above. The browser binaries for Chromium,