Skip to content

Commit 3b97401

Browse files
authored
Merge pull request jupyter#5907 from bollwyvl/fix-asyncio-win-patch-version
do not apply asyncio patch for tornado >=6.1
2 parents 0c83c9d + 73c9ac1 commit 3b97401

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notebook/notebookapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,7 @@ def init_shutdown_no_activity(self):
20412041
def _init_asyncio_patch(self):
20422042
"""set default asyncio policy to be compatible with tornado
20432043
2044-
Tornado 6 (at least) is not compatible with the default
2044+
Tornado <6.1 is not compatible with the default
20452045
asyncio implementation on Windows
20462046
20472047
Pick the older SelectorEventLoopPolicy on Windows
@@ -2054,7 +2054,7 @@ def _init_asyncio_patch(self):
20542054
FIXME: if/when tornado supports the defaults in asyncio,
20552055
remove and bump tornado requirement for py38
20562056
"""
2057-
if sys.platform.startswith("win") and sys.version_info >= (3, 8):
2057+
if sys.platform.startswith("win") and sys.version_info >= (3, 8) and tornado.version_info < (6, 1):
20582058
import asyncio
20592059
try:
20602060
from asyncio import (

0 commit comments

Comments
 (0)