Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
Restrict workaround to affected Py version(s) and add more information
Browse files Browse the repository at this point in the history
  • Loading branch information
lbianchi-lbl committed Nov 20, 2020
1 parent 1a9ac66 commit a7fcb0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@


# This is a workaround for a bug in some versions of Tornado on Windows for Python 3.8
# the sys.version_info check includes the micro version, so e.g. 3.7.1 will also evaluate to True
if sys.platform == "win32" and sys.version_info > (3, 7):
# this is the recommended fix for this according to e.g. https://github.com/tornadoweb/tornado#2608
# it should be revisited with python>=3.9 or if a fix is implemented by e.g. Jupyter
# the sys.version_info check includes the micro version, so e.g. 3.8.0 will also evaluate to True
if sys.platform == "win32" and sys.version_info > (3, 8):
import asyncio

asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
Expand Down

0 comments on commit a7fcb0c

Please sign in to comment.