Skip to content

Commit 3e2e2f6

Browse files
authored
Merge pull request #77 from davidbrochart/fix_win3.6
Fix for windows/python<3.7
2 parents e3d2db4 + 888aa01 commit 3e2e2f6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

nbclient/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
1+
import sys
2+
import subprocess
13
from .client import NotebookClient, execute # noqa: F401
24
from ._version import version as __version__ # noqa: F401
5+
6+
7+
def _cleanup():
8+
pass
9+
10+
11+
# patch subprocess on Windows for python<3.7
12+
# see https://bugs.python.org/issue37380
13+
# the fix for python3.7: https://github.com/python/cpython/pull/15706/files
14+
if sys.platform == 'win32':
15+
if sys.version_info < (3, 7):
16+
subprocess._cleanup = _cleanup
17+
subprocess._active = None

0 commit comments

Comments
 (0)