From 73c9ac1b2cee9e41516df29dfaca3ee895f05413 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 10 Dec 2020 20:05:40 -0500 Subject: [PATCH] do not apply asyncio patch for tornado >=6.1 --- notebook/notebookapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 2ebd2c3acc..ed08d881d4 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -2041,7 +2041,7 @@ def init_shutdown_no_activity(self): def _init_asyncio_patch(self): """set default asyncio policy to be compatible with tornado - Tornado 6 (at least) is not compatible with the default + Tornado <6.1 is not compatible with the default asyncio implementation on Windows Pick the older SelectorEventLoopPolicy on Windows @@ -2054,7 +2054,7 @@ def _init_asyncio_patch(self): FIXME: if/when tornado supports the defaults in asyncio, remove and bump tornado requirement for py38 """ - if sys.platform.startswith("win") and sys.version_info >= (3, 8): + if sys.platform.startswith("win") and sys.version_info >= (3, 8) and tornado.version_info < (6, 1): import asyncio try: from asyncio import (