Merge pull request #8778 from hugovk/deprecate-3.5

Deprecate support for Python 3.5
This commit is contained in:
Pradyun Gedam 2020-08-25 20:40:01 +05:30 committed by Pradyun Gedam
parent e16ebf1b7f
commit b98dd2d07d
No known key found for this signature in database
GPG Key ID: FF99710C4332258E
3 changed files with 16 additions and 3 deletions

1
news/8181.removal Normal file
View File

@ -0,0 +1 @@
Deprecate support for Python 3.5

View File

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

View File

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