diff options
author | Hugo <hugovk@users.noreply.github.com> | 2020-08-18 15:22:16 +0300 |
---|---|---|
committer | Hugo <hugovk@users.noreply.github.com> | 2020-08-18 15:22:16 +0300 |
commit | e93257c080221da6d607a958573c4ab0e007b34c (patch) | |
tree | a567bdfb0d137fddd8a8f887d865afa63c84f26d | |
parent | ae7ed9a650bee9506d451b54abc60ba0b599a6a7 (diff) | |
download | pip-e93257c080221da6d607a958573c4ab0e007b34c.tar.gz |
Warn Python 3.5 support is deprecated and will be removed in pip 21.0, Jan 2021
-rw-r--r-- | news/8181.removal | 1 | ||||
-rw-r--r-- | src/pip/_internal/cli/base_command.py | 14 | ||||
-rw-r--r-- | tests/conftest.py | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/news/8181.removal b/news/8181.removal new file mode 100644 index 000000000..ae6bbe9f8 --- /dev/null +++ b/news/8181.removal @@ -0,0 +1 @@ +Deprecate support for Python 3.5 diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py index c3b6a856b..197400a72 100644 --- a/src/pip/_internal/cli/base_command.py +++ b/src/pip/_internal/cli/base_command.py @@ -158,7 +158,19 @@ class Command(CommandContextMixIn): "1st, 2020. Please upgrade your Python as Python 2.7 " "is no longer maintained. " ) + message - deprecated(message, replacement=None, gone_in=None) + deprecated(message, replacement=None, gone_in="21.0") + + if ( + sys.version_info[:2] == (3, 5) and + not options.no_python_version_warning + ): + message = ( + "Python 3.5 reached the end of its life on September " + "13th, 2020. Please upgrade your Python as Python 3.5 " + "is no longer maintained. pip 21.0 will drop support " + "for Python 3.5 in January 2021." + ) + deprecated(message, replacement=None, gone_in="21.0") # TODO: Try to get these passing down from the command? # without resorting to os.environ to hold these. diff --git a/tests/conftest.py b/tests/conftest.py index 2aab50207..32b6e6926 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -470,8 +470,8 @@ def in_memory_pip(): @pytest.fixture(scope="session") def deprecated_python(): - """Used to indicate whether pip deprecated this python version""" - return sys.version_info[:2] in [(2, 7)] + """Used to indicate whether pip deprecated this Python version""" + return sys.version_info[:2] in [(2, 7), (3, 5)] @pytest.fixture(scope="session") |