Drop support for EOL Python 3.4

This commit is contained in:
Hugo 2019-07-23 22:49:21 +03:00
parent d8c992acc3
commit 8f32b8f425
5 changed files with 9 additions and 9 deletions

View File

@ -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():

View File

@ -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)]

View File

@ -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'],
}
)

View File

@ -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.

View File

@ -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')