File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -23,4 +23,6 @@ install:
23
23
- cmd : pip install git+https://github.com/gateway-experiments/jupyter_kernel_mgmt.git@fix-windows
24
24
25
25
test_script :
26
- - nosetests -v jupyter_server --exclude-dir notebook\tests\selenium
26
+ - nosetests -v jupyter_server.services.kernels.tests
27
+ - nosetests -v jupyter_server.tests.test_utils
28
+ # - nosetests -v jupyter_server --exclude-dir notebook\tests\selenium
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Jupyter Development Team.
2
2
# Distributed under the terms of the Modified BSD License.
3
-
3
+ import asyncio
4
4
import os
5
5
import json
6
6
import logging
7
7
8
8
from jupyter_kernel_mgmt .discovery import KernelFinder
9
9
from socket import gaierror
10
10
from tornado import gen , web
11
+ from tornado .concurrent import Future
11
12
from tornado .escape import json_encode , json_decode , url_escape
12
13
from tornado .httpclient import HTTPClient , AsyncHTTPClient , HTTPError
13
14
@@ -519,15 +520,13 @@ def _get_kernelspecs_endpoint_url(self, kernel_name=None):
519
520
520
521
return self .base_endpoint
521
522
522
- @gen .coroutine
523
+ @asyncio .coroutine
523
524
def find_kernels (self ):
524
- remote_kspecs_list = []
525
- remote_kspecs = yield maybe_future ( self . get_all_specs ())
525
+ remote_kspecs = yield from self . get_all_specs ()
526
+
526
527
# convert to list of 2 tuples
527
528
for kernel_type , attributes in remote_kspecs .items ():
528
- remote_kspecs_list .append ((kernel_type , attributes ))
529
-
530
- raise gen .Return (remote_kspecs_list )
529
+ yield kernel_type , attributes
531
530
532
531
@gen .coroutine
533
532
def get_all_specs (self ):
You can’t perform that action at this time.
0 commit comments