diff --git a/news/6106.removal b/news/6106.removal new file mode 100644 index 00000000000..56bd9a9c7ff --- /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 a8371aa8754..e1f45826ce4 100644 --- a/src/pip/_internal/cli/base_command.py +++ b/src/pip/_internal/cli/base_command.py @@ -26,6 +26,7 @@ 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 @@ def main(self, args): 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 a7bf81c5b6d..1b51fc8d322 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)