docs(python): mention loop compatibility (#8403)

This commit is contained in:
Kumar Aditya 2021-08-24 20:34:25 +05:30 committed by GitHub
parent a8a3799e9d
commit 20e4d9eee5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,