diff --git a/.ci/ci_lib.py b/.ci/ci_lib.py index 47a8ddf3..3e716385 100644 --- a/.ci/ci_lib.py +++ b/.ci/ci_lib.py @@ -10,7 +10,10 @@ import shutil import sys import tempfile -import subprocess32 as subprocess +if sys.version_info < (3, 0): + import subprocess32 as subprocess +else: + import subprocess try: import urlparse diff --git a/tests/requirements.txt b/tests/requirements.txt index df755585..9e5e8c83 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -8,7 +8,7 @@ cffi==1.14.3 # Random pin to try and fix pyparser==2.18 not having effect pycparser==2.18 # Last version supporting 2.6. pytest-catchlog==1.2.2 pytest==3.1.2 -subprocess32==3.5.4 +subprocess32==3.5.4; python_version < '3.0' timeoutcontext==1.2.0 # Fix InsecurePlatformWarning while creating py26 tox environment # https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings diff --git a/tests/testlib.py b/tests/testlib.py index 242f211b..a8db4a2e 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -18,7 +18,10 @@ except ImportError: import ConfigParser as configparser import psutil -import subprocess32 as subprocess +if sys.version_info < (3, 0): + import subprocess32 as subprocess +else: + import subprocess import mitogen.core import mitogen.fork