This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: asyncio: is it time to make ProactorEventLoop as the default event loop?
Type: Stage: resolved
Components: asyncio Versions: Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, carltongibson, miss-islington, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2018-09-14 19:35 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9538 merged vstinner, 2018-09-24 15:03
PR 9623 merged vstinner, 2018-09-28 14:49
Messages (9)
msg325391 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-14 19:35
Is it time to make ProactorEventLoop as the default event loop?

Since 2014, many features have been added to ProactorEventLoop (ex: SSL support) and the implementation is way more today than it was 4 years ago.

Comparison of SelectorEventLoop and ProactorEventLoop on Windows:
msg325394 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2018-09-14 20:13
I'm not sure that ProactorEventLoop is stable enough TBH :(  And I wouldn't be able to be on call for Windows users to fix all bugs in ProactieEventLoop.

Andrew, your thoughts on this?
msg326361 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2018-09-25 15:27
New changeset 6ea29c5e90dde6c240bd8e0815614b52ac307ea1 by Yury Selivanov (Victor Stinner) in branch 'master':
bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538)
msg326363 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-25 15:31
Thank you for the review Yury ;-)
msg326424 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2018-09-26 07:40
I think the only way to make sure that proactor event loop is stable -- starting to use it everywhere on Windows.

Let's do it.
msg326641 - (view) Author: miss-islington (miss-islington) Date: 2018-09-28 15:40
New changeset 37aae9dcf18753b8ffda99d1a5758a90af852464 by Miss Islington (bot) (Victor Stinner) in branch 'master':
bpo-34687: Update asyncio doc for ProactorEventLoop (GH-9623)
msg355210 - (view) Author: Carlton Gibson (carltongibson) Date: 2019-10-23 10:12
This change causes an issue in asgiref (and so Django) for Windows and Python 3.8.

It looks as if `ProactorEventLoop` needs to check the current thread before triggering the signal... 

File "C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python38\.env\lib\site-packages\asgiref\", line 130, in _run_event_loop
File "C:\Python38\lib\asyncio\", line 679, in close
ValueError: set_wakeup_fd only works in main thread

... but I'm not familiar with the internals here as yet. 

(I'm guessing I need to create a new issue?)
msg355211 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-10-23 10:20
> (I'm guessing I need to create a new issue?)

Please open a new issue.
msg355215 - (view) Author: Carlton Gibson (carltongibson) Date: 2019-10-23 12:14

Date User Action Args
2022-04-11 14:59:05adminsetgithub: 78868
2019-10-23 12:14:41carltongibsonsetmessages: + msg355215
2019-10-23 10:20:15vstinnersetmessages: + msg355211
2019-10-23 10:12:12carltongibsonsetnosy: + carltongibson
messages: + msg355210
2018-09-28 15:40:13miss-islingtonsetnosy: + miss-islington
messages: + msg326641
2018-09-28 14:49:05vstinnersetpull_requests: + pull_request9021
2018-09-26 07:40:56asvetlovsetmessages: + msg326424
2018-09-25 15:31:18vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg326363

stage: patch review -> resolved
2018-09-25 15:27:21yselivanovsetmessages: + msg326361
2018-09-24 15:03:14vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request8940
2018-09-14 20:13:31yselivanovsetmessages: + msg325394
2018-09-14 19:35:17vstinnercreate