Skip to content

Prepare for python 3.8 on windows #2608

@bdarnell

Description

@bdarnell

Python 3.8 asyncio is going to make the "proactor" event loop the default, instead of the current "selector" event loop. This is a problem for Tornado because the proactor event loop doesn't support the unix-style add_reader APIs that Tornado uses.

Anyone using Tornado 5+ on windows with python 3.8 will need to configure asyncio to use the selector event loop; we'll have to document this. We should also try to detect the use of a proactor event loop and give a clear error message (the current NotImplementError message can be seen in this SO post).

I don't think it would be appropriate for Tornado itself to configure the selector event loop automatically, since it has drawbacks (less scalability than the proactor loop, the user may want to use another event loop entirely like uvloop). Applications using Tornado (like jupyter notebook) may wish to do so, though. Maybe there should even be some more magical way to choose the selector loop (an environment variable? a special package to install?) to avoid the need to build this in to each application, although i don't really like the idea of that much magic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions