Skip to content

Commit

Permalink
Warn Python 3.5 support is deprecated and will be removed in pip 21.0…
Browse files Browse the repository at this point in the history
…, Jan 2021
  • Loading branch information
hugovk committed Aug 18, 2020
1 parent ae7ed9a commit e93257c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions news/8181.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate support for Python 3.5
14 changes: 13 additions & 1 deletion src/pip/_internal/cli/base_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,19 @@ def _main(self, args):
"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.
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e93257c

Please sign in to comment.