Skip to content

Commit 27bc44c

Browse files
authored
Test with client 8 updates (#992)
* Test with client 8 updates (#988) * pin mistune * fix docs and remove explicit installs
1 parent f8e122b commit 27bc44c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/doc-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ipykernel
22
jinja2
33
jupyter_client
4+
jupyter_server
5+
mistune<1.0.0
46
myst-parser
57
nbformat
68
prometheus_client

jupyter_server/services/kernels/handlers.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""
55
# Copyright (c) Jupyter Development Team.
66
# Distributed under the terms of the Modified BSD License.
7+
import asyncio
78
import json
89
from textwrap import dedent
910
from traceback import format_tb
@@ -15,8 +16,9 @@
1516
except ImportError:
1617
from jupyter_client.jsonutil import date_default as json_default
1718

19+
from concurrent.futures import Future
20+
1821
from tornado import gen, web
19-
from tornado.concurrent import Future
2022
from tornado.ioloop import IOLoop
2123

2224
from jupyter_server.auth import authorized
@@ -55,7 +57,9 @@ async def post(self):
5557
else:
5658
model.setdefault("name", km.default_kernel_name)
5759

58-
kernel_id = await km.start_kernel(kernel_name=model["name"], path=model.get("path"))
60+
kernel_id = await ensure_async(
61+
km.start_kernel(kernel_name=model["name"], path=model.get("path"))
62+
)
5963
model = await ensure_async(km.kernel_model(kernel_id))
6064
location = url_path_join(self.base_url, "api", "kernels", url_escape(kernel_id))
6165
self.set_header("Location", location)
@@ -404,7 +408,7 @@ def give_up():
404408
loop = IOLoop.current()
405409
loop.add_timeout(loop.time() + self.kernel_info_timeout, give_up)
406410
# actually wait for it
407-
await future
411+
await asyncio.wrap_future(future)
408412

409413
async def get(self, kernel_id):
410414
self.kernel_id = kernel_id

readthedocs.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,3 @@ sphinx:
33
configuration: docs/source/conf.py
44
conda:
55
environment: docs/environment.yml
6-
python:
7-
version: 3.8
8-
install:
9-
# install itself with pip install .
10-
- method: pip
11-
path: .

0 commit comments

Comments
 (0)