diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9235e7f973..b033c1146b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,11 +12,6 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: [ '3.5', '3.6', '3.7', '3.8' ] - exclude: - - os: windows-latest - python-version: '3.5' - - os: windows-latest - python-version: '3.6' steps: - name: Checkout uses: actions/checkout@v1 diff --git a/README.md b/README.md index 752c67d701..b442958b7b 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,7 @@ To install the latest release locally, make sure you have $ pip install jupyter_server -Jupyter Server currently supports the following Python versions: - -Platform | Python ---- | --- -Linux | >=3.5 -OSX | >=3.5 -Windows | >=3.7 +Jupyter Server currently supports Python>=3.5 on Linux, OSX and Windows. ### Versioning and Branches diff --git a/jupyter_server/__init__.py b/jupyter_server/__init__.py index 9611848e60..9a2bce1ffc 100644 --- a/jupyter_server/__init__.py +++ b/jupyter_server/__init__.py @@ -1,6 +1,8 @@ """The Jupyter Server""" import os +import sys +import subprocess DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static") DEFAULT_TEMPLATE_PATH_LIST = [ @@ -11,3 +13,16 @@ del os from ._version import version_info, __version__ + + +def _cleanup(): + pass + + +# patch subprocess on Windows for python<3.7 +# see https://bugs.python.org/issue37380 +# the fix for python3.7: https://github.com/python/cpython/pull/15706/files +if sys.platform == 'win32': + if sys.version_info < (3, 7): + subprocess._cleanup = _cleanup + subprocess._active = None diff --git a/setup.py b/setup.py index 8f478da91f..d4ad5abeb4 100755 --- a/setup.py +++ b/setup.py @@ -19,16 +19,10 @@ name = "jupyter_server" # Minimal Python version sanity check -if sys.platform == 'win32': - if sys.version_info < (3,7): - error = "ERROR: %s requires Python version 3.7 or above." % name - print(error, file=sys.stderr) - sys.exit(1) -else: - if sys.version_info < (3,5): - error = "ERROR: %s requires Python version 3.5 or above." % name - print(error, file=sys.stderr) - sys.exit(1) +if sys.version_info < (3,5): + error = "ERROR: %s requires Python version 3.5 or above." % name + print(error, file=sys.stderr) + sys.exit(1) # At least we're on the python version we need, move on.