Skip to content

Commit a2ab44e

Browse files
committed
Don't get child_watcher if on Windows
1 parent 0186eb8 commit a2ab44e

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ before_install:
2828
2929
install:
3030
- pip install --pre .[test] $EXTRA_PIP
31+
- pip install git+https://github.com/gateway-experiments/jupyter_kernel_mgmt.git@fix-windows
3132
- pip freeze
3233
- wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb && sudo dpkg -i pandoc-1.19.1-1-amd64.deb
3334

appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ matrix:
44

55
environment:
66
matrix:
7-
- CONDA_PY: 36
7+
- CONDA_PY: 37
88
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
99

1010
platform:
@@ -17,8 +17,10 @@ install:
1717
- cmd: conda config --set show_channel_urls true
1818
- cmd: conda config --add channels conda-forge
1919
#- cmd: conda update --yes --quiet conda
20+
#- cmd: conda install -y pyzmq tornado jupyter_kernel_mgmt nbformat nbconvert ipykernel pip nose
2021
- cmd: conda install -y pyzmq tornado jupyter_client nbformat nbconvert ipykernel pip nose
2122
- cmd: pip install .[test]
23+
- cmd: pip install git+https://github.com/gateway-experiments/jupyter_kernel_mgmt.git@fix-windows
2224

2325
test_script:
2426
- nosetests -v jupyter_server --exclude-dir notebook\tests\selenium

jupyter_server/tests/launchserver.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,12 @@ def start_thread():
180180
started.set()
181181
app.session_manager.close()
182182

183-
# The following is required for kernel api tests in order for asyncio.create_subprocess_exec()
184-
# to work from tests - which requires that child_watcher be on the main thread.
185-
# https://docs.python.org/3/library/asyncio-subprocess.html#subprocess-and-threads
186-
asyncio.get_event_loop()
187-
asyncio.get_child_watcher()
183+
if not sys.platform.startswith("win"):
184+
# The following is required for kernel api tests in order for asyncio.create_subprocess_exec()
185+
# to work from tests - which requires that child_watcher be on the main thread.
186+
# https://docs.python.org/3/library/asyncio-subprocess.html#subprocess-and-threads
187+
asyncio.get_event_loop()
188+
asyncio.get_child_watcher()
188189

189190
cls.server_thread = Thread(target=start_thread)
190191
cls.server_thread.daemon = True

0 commit comments

Comments
 (0)