Skip to content

Commit 8ee0b08

Browse files
bollwyvlZsailer
authored andcommitted
updates from review
1 parent 2624a33 commit 8ee0b08

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

jupyter_server/serverapp.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,16 @@
4141
from jupyter_server.transutils import trans, _
4242
from jupyter_server.utils import secure_write, run_sync
4343

44-
# check for tornado 3.1.0
44+
# the minimum viable tornado version: needs to be kept in sync with setup.py
45+
MIN_TORNADO = (6, 1)
46+
4547
try:
4648
import tornado
47-
except ImportError as e:
48-
raise ImportError(_("The Jupyter Server requires tornado >= 4.0")) from e
49-
try:
50-
version_info = tornado.version_info
51-
except AttributeError as e:
52-
raise ImportError(_("The Jupyter Server requires tornado >= 4.0, but you have < 1.1.0")) from e
53-
if version_info < (4,0):
54-
raise ImportError(_("The Jupyter Server requires tornado >= 4.0, but you have %s") % tornado.version)
49+
assert tornado.version_info >= MIN_TORNADO
50+
except (ImportError, AttributeError, AssertionError) as e: # pragma: no cover
51+
raise ImportError(
52+
_("The Jupyter Server requires tornado >=%s", ".".join(MIN_TORNADO))
53+
) from e
5554

5655
from tornado import httpserver
5756
from tornado import ioloop

tests/conftest.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/test_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def fetch_expect_200(fetch, *path_parts):
2727

2828
async def fetch_expect_404(fetch, *path_parts):
2929
with pytest.raises(tornado.httpclient.HTTPClientError) as e:
30-
r = await fetch('files', *path_parts, method='GET')
30+
await fetch('files', *path_parts, method='GET')
3131
assert expected_http_error(e, 404), [path_parts, e]
3232

3333

0 commit comments

Comments
 (0)