summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPradyun Gedam <3275593+pradyunsg@users.noreply.github.com>2020-08-25 20:40:01 +0530
committerGitHub <noreply@github.com>2020-08-25 20:40:01 +0530
commitb7075b9351ef220f609e8b7bbd6045c626653fb0 (patch)
treef37485a68e7c9c2df2328cc6f9ba42a31a5673c8
parentc50307ebc47483f7f94b7abeb79e7dea1912eb5d (diff)
parente93257c080221da6d607a958573c4ab0e007b34c (diff)
downloadpip-b7075b9351ef220f609e8b7bbd6045c626653fb0.tar.gz
Merge pull request #8778 from hugovk/deprecate-3.5
Deprecate support for Python 3.5
-rw-r--r--news/8181.removal1
-rw-r--r--src/pip/_internal/cli/base_command.py14
-rw-r--r--tests/conftest.py4
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")