Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPrepare for python 3.8 on windows #2608
Comments
|
so the ugly patch is to do this on Tornado asyncio.py
what should be the external procedure (per client packages, like for example Jupyter packages) ? |
|
I think you can do that at the beginning of your |
|
https://twitter.com/VictorStinner/status/1133323227298697216?s=09 """" |
|
I've filed https://bugs.python.org/issue37373 upstream but it doesn't look like we'll be able to have any solution besides documenting the need for applications to set the event loop policy. |
|
hum, let see how Jupyter team will handle the problem. |
|
also, as a remark, trio project (and uvloop ?) somehow succeeded to make the proactorLoop work in "select" mode. |
|
not implemented till date if sys.platform == 'win32': add above in \Lib\site-packages\tornado\platform\asyncio.py |
|
for completeness, here's a workaround snippet that also ensures this happens only if python version is 3.8 or more:
|
… 4.7.4
Carlos Cordoba (3):
Back to work
Update Changelog
Release 4.7.4
Eric Prestat (1):
Workaround tornado+py38+windows compatibility issue, see tornadoweb/tornado#2608.
Ray Osborn (1):
Fixes a TypeError in CallTipWidget
Stephannie Jimenez (1):
verify if event has attribute button
dalthviz (6):
Use Python 2.7.17 to prevent memory segfaults when running the tests
Fix CompletionWidget common prefix handling
Add test for the CompletionWidget handling of common paths
Redo dot completion handling and add test
Fix test_common_path_complete - Python 2
Testing
Python 3.8 makes proactor event loop the default on Windows, Tornado doesn't like that. See also tornadoweb/tornado#2608
This reverts 2c3112f. Windows only supports subprocesses with the asyncio ProactorEventLoop, however tornado only supports the SelectorEventLoop. tornadoweb/tornado#2608
`asyncio`'s default event loop is changed in Python3.8, causing Tornado to break on Windows. The fix is simply to ensure the old event loop is kept, when ran on Python >= 3.8, and on Windows. More info can be found here: * tornadoweb/tornado#2608 * lepture/python-livereload#209

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

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_readerAPIs 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.