From 1fc9bc0b7276513e65973dafb636a896cd8adb0f Mon Sep 17 00:00:00 2001 From: Kevin Bates Date: Thu, 2 Apr 2020 10:52:50 -0700 Subject: [PATCH] Add comments indicating when dependency check can be removed --- notebook/notebookapp.py | 4 ++-- notebook/services/kernels/tests/test_kernels_api.py | 4 ++-- notebook/services/sessions/tests/test_sessions_api.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index bbba3fc1a..969654311 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1392,10 +1392,10 @@ class NotebookApp(JupyterApp): ) # Ensure the appropriate version of Python and jupyter_client is available. if isinstance(self.kernel_manager, AsyncMappingKernelManager): - if sys.version_info < (3, 6): + if sys.version_info < (3, 6): # Can be removed once 3.5 is dropped. raise ValueError("You are using `AsyncMappingKernelManager` in Python 3.5 (or lower) " "which is not supported. Please upgrade Python to 3.6+ or change kernel managers.") - if not async_kernel_mgmt_available: + if not async_kernel_mgmt_available: # Can be removed once jupyter_client >= 6.1 is required. raise ValueError("You are using `AsyncMappingKernelManager` without an appropriate " "jupyter_client installed! Please upgrade jupyter_client or change kernel managers.") self.log.info("Asynchronous kernel management has been configured to use '{}'.". diff --git a/notebook/services/kernels/tests/test_kernels_api.py b/notebook/services/kernels/tests/test_kernels_api.py index 11468a7ce..70ae0e878 100644 --- a/notebook/services/kernels/tests/test_kernels_api.py +++ b/notebook/services/kernels/tests/test_kernels_api.py @@ -201,9 +201,9 @@ class AsyncKernelAPITest(KernelAPITest): @classmethod def setup_class(cls): - if not async_testing_enabled: + if not async_testing_enabled: # Can be removed once jupyter_client >= 6.1 is required. raise SkipTest("AsyncKernelAPITest tests skipped due to down-level jupyter_client!") - if sys.version_info < (3, 6): + if sys.version_info < (3, 6): # Can be removed once 3.5 is dropped. raise SkipTest("AsyncKernelAPITest tests skipped due to Python < 3.6!") super(AsyncKernelAPITest, cls).setup_class() diff --git a/notebook/services/sessions/tests/test_sessions_api.py b/notebook/services/sessions/tests/test_sessions_api.py index 096796da9..0e30fc3ea 100644 --- a/notebook/services/sessions/tests/test_sessions_api.py +++ b/notebook/services/sessions/tests/test_sessions_api.py @@ -271,9 +271,9 @@ class AsyncSessionAPITest(SessionAPITest): @classmethod def setup_class(cls): - if not async_testing_enabled: + if not async_testing_enabled: # Can be removed once jupyter_client >= 6.1 is required. raise SkipTest("AsyncSessionAPITest tests skipped due to down-level jupyter_client!") - if sys.version_info < (3, 6): + if sys.version_info < (3, 6): # Can be removed once 3.5 is dropped. raise SkipTest("AsyncSessionAPITest tests skipped due to Python < 3.6!") super(AsyncSessionAPITest, cls).setup_class()