diff --git a/src/pip/_internal/utils/compat.py b/src/pip/_internal/utils/compat.py index ec3995c2968732a69c8cb11daec36e97af90073c..3bb87648d0c47956c1b43de73b54ce25d69c06ee 100644 --- a/src/pip/_internal/utils/compat.py +++ b/src/pip/_internal/utils/compat.py @@ -47,7 +47,7 @@ logger = logging.getLogger(__name__) HAS_TLS = (ssl is not None) or IS_PYOPENSSL -if sys.version_info >= (3, 4): +if sys.version_info >= (3,): uses_pycache = True from importlib.util import cache_from_source else: @@ -62,7 +62,7 @@ else: uses_pycache = cache_from_source is not None -if sys.version_info >= (3, 5): +if sys.version_info >= (3,): backslashreplace_decode = "backslashreplace" else: # In version 3.4 and older, backslashreplace exists @@ -202,7 +202,7 @@ def get_path_uid(path): return file_uid -if sys.version_info >= (3, 4): +if sys.version_info >= (3,): from importlib.machinery import EXTENSION_SUFFIXES def get_extension_suffixes(): diff --git a/tests/conftest.py b/tests/conftest.py index d1a12d65e5d33836aa9d92f065916e6460f45a89..f682564966f50e2ca26fe878ca0199efbd17ff4f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -352,4 +352,4 @@ def in_memory_pip(): @pytest.fixture def deprecated_python(): """Used to indicate whether pip deprecated this python version""" - return sys.version_info[:2] in [(3, 4), (2, 7)] + return sys.version_info[:2] in [(2, 7)] diff --git a/tests/data/packages/LocalEnvironMarker/setup.py b/tests/data/packages/LocalEnvironMarker/setup.py index cc2cd317aa40678fbcd400ade679ffca05c8973b..36ceb214cf71ceefdd34c72f24538939a948f91d 100644 --- a/tests/data/packages/LocalEnvironMarker/setup.py +++ b/tests/data/packages/LocalEnvironMarker/setup.py @@ -22,6 +22,6 @@ setup( version='0.0.1', packages=find_packages(), extras_require={ - ":python_version == '2.7' or python_version == '3.4'": ['simple'], + ":python_version == '2.7'": ['simple'], } ) diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index 96b780f3cc37e23fcf1d5b739918e04114284bea..e7b6a272d5542009160086c09e40bb7f995d8aac 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -528,7 +528,7 @@ def test_editable_install__local_dir_no_setup_py_with_pyproject( assert 'A "pyproject.toml" file was found' in msg -@pytest.mark.skipif("sys.version_info >= (3,4)") +@pytest.mark.skipif("sys.version_info >= (3,)") @pytest.mark.xfail def test_install_argparse_shadowed(script): # When argparse is in the stdlib, we support installing it @@ -543,7 +543,7 @@ def test_install_argparse_shadowed(script): @pytest.mark.network -@pytest.mark.skipif("sys.version_info < (3,4)") +@pytest.mark.skipif("sys.version_info < (3,)") def test_upgrade_argparse_shadowed(script): # If argparse is installed - even if shadowed for imported - we support # upgrading it and properly remove the older versions files. diff --git a/tests/unit/test_req.py b/tests/unit/test_req.py index 23a70f778900d1c4762be9e2fe759d3c18793c89..4b729cefc331f0d78c29c1e74f1200a52bd4ac0e 100644 --- a/tests/unit/test_req.py +++ b/tests/unit/test_req.py @@ -83,7 +83,7 @@ class TestRequirementSet(object): reqset, ) - # TODO: Update test when Python 2.7 or Python 3.4 is dropped. + # TODO: Update test when Python 2.7 is dropped. def test_environment_marker_extras(self, data): """ Test that the environment marker extras are used with @@ -99,7 +99,7 @@ class TestRequirementSet(object): resolver = self._basic_resolver(finder) resolver.resolve(reqset) # This is hacky but does test both case in py2 and py3 - if sys.version_info[:2] in ((2, 7), (3, 4)): + if sys.version_info[:2] == (2, 7): assert reqset.has_requirement('simple') else: assert not reqset.has_requirement('simple')