Skip to content

Commit 8c2aec6

Browse files
committed
Fix python<3.7 on windows
1 parent f1df254 commit 8c2aec6

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ To install the latest release locally, make sure you have
1414

1515
$ pip install jupyter_server
1616

17-
Jupyter Server currently supports the following Python versions:
18-
19-
Platform | Python
20-
--- | ---
21-
Linux | >=3.5
22-
OSX | >=3.5
23-
Windows | >=3.7
17+
Jupyter Server currently supports Python>=3.5 on Linux, OSX and Windows.
2418

2519
### Versioning and Branches
2620

jupyter_server/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""The Jupyter Server"""
22

33
import os
4+
import sys
5+
import subprocess
46

57
DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static")
68
DEFAULT_TEMPLATE_PATH_LIST = [
@@ -11,3 +13,16 @@
1113
del os
1214

1315
from ._version import version_info, __version__
16+
17+
18+
def _cleanup():
19+
pass
20+
21+
22+
# patch subprocess on Windows for python<3.7
23+
# see https://bugs.python.org/issue37380
24+
# the fix for python3.7: https://github.com/python/cpython/pull/15706/files
25+
if sys.platform == 'win32':
26+
if sys.version_info < (3, 7):
27+
subprocess._cleanup = _cleanup
28+
subprocess._active = None

0 commit comments

Comments
 (0)