Skip to content

Commit b7075b9

Browse files
authored
Merge pull request #8778 from hugovk/deprecate-3.5
Deprecate support for Python 3.5
2 parents c50307e + e93257c commit b7075b9

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

news/8181.removal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate support for Python 3.5

src/pip/_internal/cli/base_command.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,19 @@ def _main(self, args):
158158
"1st, 2020. Please upgrade your Python as Python 2.7 "
159159
"is no longer maintained. "
160160
) + message
161-
deprecated(message, replacement=None, gone_in=None)
161+
deprecated(message, replacement=None, gone_in="21.0")
162+
163+
if (
164+
sys.version_info[:2] == (3, 5) and
165+
not options.no_python_version_warning
166+
):
167+
message = (
168+
"Python 3.5 reached the end of its life on September "
169+
"13th, 2020. Please upgrade your Python as Python 3.5 "
170+
"is no longer maintained. pip 21.0 will drop support "
171+
"for Python 3.5 in January 2021."
172+
)
173+
deprecated(message, replacement=None, gone_in="21.0")
162174

163175
# TODO: Try to get these passing down from the command?
164176
# without resorting to os.environ to hold these.

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ def in_memory_pip():
470470

471471
@pytest.fixture(scope="session")
472472
def deprecated_python():
473-
"""Used to indicate whether pip deprecated this python version"""
474-
return sys.version_info[:2] in [(2, 7)]
473+
"""Used to indicate whether pip deprecated this Python version"""
474+
return sys.version_info[:2] in [(2, 7), (3, 5)]
475475

476476

477477
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)