Skip to content

Commit

Permalink
Merge pull request #8778 from hugovk/deprecate-3.5
Browse files Browse the repository at this point in the history
Deprecate support for Python 3.5
  • Loading branch information
pradyunsg authored Aug 25, 2020
2 parents c50307e + e93257c commit b7075b9
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 b7075b9

Please sign in to comment.