From b268c67f84b1e4ef93c67831c8250d3d5bb1d3c4 Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Fri, 11 Jan 2019 11:14:25 +0100 Subject: [PATCH] Deprecate Python 3.4 --- news/6106.removal | 1 + src/pip/_internal/cli/base_command.py | 10 ++++++++++ tests/conftest.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 news/6106.removal diff --git a/news/6106.removal b/news/6106.removal new file mode 100644 index 000000000..56bd9a9c7 --- /dev/null +++ b/news/6106.removal @@ -0,0 +1 @@ +Deprecate support for Python 3.4 diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py index a8371aa87..e1f45826c 100644 --- a/src/pip/_internal/cli/base_command.py +++ b/src/pip/_internal/cli/base_command.py @@ -26,6 +26,7 @@ from pip._internal.req.constructors import ( install_req_from_editable, install_req_from_line, ) from pip._internal.req.req_file import parse_requirements +from pip._internal.utils.deprecation import deprecated from pip._internal.utils.logging import setup_logging from pip._internal.utils.misc import ( get_prog, normalize_path, redact_password_from_url, @@ -134,6 +135,15 @@ class Command(object): user_log_file=options.log, ) + if sys.version_info[:2] == (3, 4): + deprecated( + "Python 3.4 support has been deprecated. pip 19.1 will be the " + "last one supporting it. Please upgrade your Python as Python " + "3.4 won't be maintained after March 2019 (cf PEP 429).", + replacement=None, + gone_in='19.2', + ) + # TODO: Try to get these passing down from the command? # without resorting to os.environ to hold these. # This also affects isolated builds and it should. diff --git a/tests/conftest.py b/tests/conftest.py index a7bf81c5b..1b51fc8d3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -349,4 +349,4 @@ def in_memory_pip(): @pytest.fixture def deprecated_python(): """Used to indicate wheither pip deprecated this python version""" - return False + return sys.version_info[:2] == (3, 4)