From 7c775c86df34bffd3b56df58847ca87f8bd5778f Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 30 Nov 2020 17:55:13 +0000 Subject: [PATCH 01/10] Update python_requires in setup.py I am really happy to make this nice and short. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2601d8bd912..fe751c28194 100644 --- a/setup.py +++ b/setup.py @@ -85,5 +85,5 @@ def get_version(rel_path): }, zip_safe=False, - python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', + python_requires='>=3.6', ) From aaae3c5c3291f0feb73825685ac4e2005ec2d5e2 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 30 Nov 2020 19:36:17 +0000 Subject: [PATCH 02/10] Update classifiers to drop Python 2.5,3.5 --- setup.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.py b/setup.py index fe751c28194..0c2808e9218 100644 --- a/setup.py +++ b/setup.py @@ -40,10 +40,7 @@ def get_version(rel_path): "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Build Tools", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", From 872fd658c4d8f4676d491d7986ba1a78a201f701 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 19 Dec 2020 16:09:55 +0000 Subject: [PATCH 03/10] Add `Python 3 :: Only` classifier --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 0c2808e9218..b7d0e8f51d7 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,7 @@ def get_version(rel_path): "Topic :: Software Development :: Build Tools", "Programming Language :: Python", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only" "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", From 527550d5a7f1e967498f6eeca83a13b52cbcd136 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 30 Nov 2020 20:55:54 +0000 Subject: [PATCH 04/10] Drop Python 2.7 and 3.5 from CI --- .azure-pipelines/jobs/test-windows.yml | 16 ++-------------- .azure-pipelines/jobs/test.yml | 10 ++-------- .github/workflows/macos.yml | 2 +- .travis.yml | 4 ---- noxfile.py | 2 +- 5 files changed, 6 insertions(+), 28 deletions(-) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 6053b0eb005..99cd8a836bd 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -9,14 +9,8 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - "2.7-x86": - python.version: '2.7' - python.architecture: x86 - "2.7": # because Python 2! - python.version: '2.7' - python.architecture: x64 - "3.5": # lowest Py3 version - python.version: '3.5' + "3.6": # lowest Python version + python.version: '3.6' python.architecture: x64 "3.8": # current python.version: '3.8' @@ -38,16 +32,10 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - "3.6": - python.version: '3.6' - python.architecture: x64 "3.7": python.version: '3.7' python.architecture: x64 # This is for Windows, so test x86 builds - "3.5-x86": - python.version: '3.5' - python.architecture: x86 "3.6-x86": python.version: '3.6' python.architecture: x86 diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index 274e075a69b..a3a0ef80b6d 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -9,8 +9,8 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - "2.7": - python.version: '2.7' + "3.6": # lowest Python version + python.version: '3.6' python.architecture: x64 "3.8": python.version: '3.8' @@ -29,12 +29,6 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - "3.5": - python.version: '3.5' - python.architecture: x64 - "3.6": - python.version: '3.6' - python.architecture: x64 "3.7": python.version: '3.7' python.architecture: x64 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5d7b9acab87..c7afa8d35ea 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -91,7 +91,7 @@ jobs: strategy: fail-fast: false matrix: - python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9] + python: [3.6, 3.7, 3.8, 3.9] steps: # Caches diff --git a/.travis.yml b/.travis.yml index 165d2ef1540..9e685d1ecec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,10 +26,6 @@ jobs: python: pypy3.5-7.0.0 - env: GROUP=2 python: pypy3.5-7.0.0 - - env: GROUP=1 - python: pypy2.7-7.1.1 - - env: GROUP=2 - python: pypy2.7-7.1.1 before_install: tools/travis/setup.sh install: travis_retry tools/travis/install.sh diff --git a/noxfile.py b/noxfile.py index 29e3959e463..b94cfe86fe7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -70,7 +70,7 @@ def should_update_common_wheels(): # completely to nox for all our automation. Contributors should prefer using # `tox -e ...` until this note is removed. # ----------------------------------------------------------------------------- -@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3"]) +@nox.session(python=["3.6", "3.7", "3.8", "3.9", "pypy3"]) def test(session): # Get the common wheels. if should_update_common_wheels(): From b2bcb2611ddbc3f51580cbb4be87b3275926e127 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 19 Dec 2020 15:57:49 +0000 Subject: [PATCH 05/10] Bump to PyPy 3.6 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9e685d1ecec..6610b6eb019 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,9 @@ jobs: # PyPy - stage: secondary env: GROUP=1 - python: pypy3.5-7.0.0 + python: pypy3.6-7.3.1 - env: GROUP=2 - python: pypy3.5-7.0.0 + python: pypy3.6-7.3.1 before_install: tools/travis/setup.sh install: travis_retry tools/travis/install.sh From 0befae128a5da8f6d400b83d6df1c05533f0f31e Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 30 Nov 2020 20:56:41 +0000 Subject: [PATCH 06/10] Drop CI info about Python 2.7/3.5 --- docs/html/development/ci.rst | 38 ------------------------------------ docs/html/installing.rst | 2 +- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/docs/html/development/ci.rst b/docs/html/development/ci.rst index 5befb316a4d..5c33231b1b2 100644 --- a/docs/html/development/ci.rst +++ b/docs/html/development/ci.rst @@ -17,12 +17,9 @@ Supported interpreters pip support a variety of Python interpreters: -- CPython 2.7 -- CPython 3.5 - CPython 3.6 - CPython 3.7 - CPython 3.8 -- Latest PyPy - Latest PyPy3 on different operating systems: @@ -95,9 +92,6 @@ Actual testing +------------------------------+---------------+-----------------+ | **interpreter** | **unit** | **integration** | +-----------+----------+-------+---------------+-----------------+ -| | | CP2.7 | Azure | Azure | -| | +-------+---------------+-----------------+ -| | | CP3.5 | Azure | | | | +-------+---------------+-----------------+ | | | CP3.6 | Azure | | | | +-------+---------------+-----------------+ @@ -105,77 +99,45 @@ Actual testing | | +-------+---------------+-----------------+ | | | CP3.8 | Azure | | | | +-------+---------------+-----------------+ -| | | PyPy | | | -| | +-------+---------------+-----------------+ | | | PyPy3 | | | | Windows +----------+-------+---------------+-----------------+ -| | | CP2.7 | Azure | Azure | -| | +-------+---------------+-----------------+ -| | | CP3.5 | Azure | Azure | -| | +-------+---------------+-----------------+ | | | CP3.6 | Azure | | | | +-------+---------------+-----------------+ | | x64 | CP3.7 | Azure | | | | +-------+---------------+-----------------+ | | | CP3.8 | Azure | Azure | | | +-------+---------------+-----------------+ -| | | PyPy | | | -| | +-------+---------------+-----------------+ | | | PyPy3 | | | +-----------+----------+-------+---------------+-----------------+ -| | | CP2.7 | | | -| | +-------+---------------+-----------------+ -| | | CP3.5 | | | -| | +-------+---------------+-----------------+ | | | CP3.6 | | | | | +-------+---------------+-----------------+ | | x86 | CP3.7 | | | | | +-------+---------------+-----------------+ | | | CP3.8 | | | | | +-------+---------------+-----------------+ -| | | PyPy | | | -| | +-------+---------------+-----------------+ | | | PyPy3 | | | | Linux +----------+-------+---------------+-----------------+ -| | | CP2.7 | Azure | Azure | -| | +-------+---------------+-----------------+ -| | | CP3.5 | Azure | Azure | -| | +-------+---------------+-----------------+ | | | CP3.6 | Azure | Azure | | | +-------+---------------+-----------------+ | | x64 | CP3.7 | Azure | Azure | | | +-------+---------------+-----------------+ | | | CP3.8 | Azure | Azure | | | +-------+---------------+-----------------+ -| | | PyPy | Travis | Travis | -| | +-------+---------------+-----------------+ | | | PyPy3 | Travis | Travis | +-----------+----------+-------+---------------+-----------------+ -| | | CP2.7 | | | -| | +-------+---------------+-----------------+ -| | | CP3.5 | | | -| | +-------+---------------+-----------------+ | | | CP3.6 | | | | | +-------+---------------+-----------------+ | | x86 | CP3.7 | | | | | +-------+---------------+-----------------+ | | | CP3.8 | | | | | +-------+---------------+-----------------+ -| | | PyPy | | | -| | +-------+---------------+-----------------+ | | | PyPy3 | | | | MacOS +----------+-------+---------------+-----------------+ -| | | CP2.7 | Azure | Azure | -| | +-------+---------------+-----------------+ -| | | CP3.5 | Azure | Azure | -| | +-------+---------------+-----------------+ | | | CP3.6 | Azure | Azure | | | +-------+---------------+-----------------+ | | x64 | CP3.7 | Azure | Azure | | | +-------+---------------+-----------------+ | | | CP3.8 | Azure | Azure | | | +-------+---------------+-----------------+ -| | | PyPy | | | -| | +-------+---------------+-----------------+ | | | PyPy3 | | | +-----------+----------+-------+---------------+-----------------+ diff --git a/docs/html/installing.rst b/docs/html/installing.rst index a49aebea4a3..9e2c7051ef3 100644 --- a/docs/html/installing.rst +++ b/docs/html/installing.rst @@ -206,7 +206,7 @@ Upgrading pip Python and OS Compatibility =========================== -pip works with CPython versions 2.7, 3.5, 3.6, 3.7, 3.8 and also PyPy. +pip works with CPython versions 3.6, 3.7, 3.8 and also PyPy. This means pip works on the latest patch version of each of these minor versions. Previous patch versions are supported on a best effort approach. From 7281ed9d9867d7a94d3000c0156189cf844c5eed Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 30 Nov 2020 20:56:56 +0000 Subject: [PATCH 07/10] No longer print a deprecation warning on 2.7/3.5 These versions are no longer supported. --- src/pip/_internal/cli/base_command.py | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py index 7f05efb85db..ce93552b3c1 100644 --- a/src/pip/_internal/cli/base_command.py +++ b/src/pip/_internal/cli/base_command.py @@ -6,7 +6,6 @@ import logging.config import optparse import os -import platform import sys import traceback @@ -139,35 +138,6 @@ def _main(self, args): user_log_file=options.log, ) - if ( - sys.version_info[:2] == (2, 7) and - not options.no_python_version_warning - ): - message = ( - "pip 21.0 will drop support for Python 2.7 in January 2021. " - "More details about Python 2 support in pip can be found at " - "https://pip.pypa.io/en/latest/development/release-process/#python-2-support" # noqa - ) - if platform.python_implementation() == "CPython": - message = ( - "Python 2.7 reached the end of its life on January " - "1st, 2020. Please upgrade your Python as Python 2.7 " - "is no longer maintained. " - ) + message - 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. # This also affects isolated builds and it should. From 79f1b593357ca9bf4219ddee4785b4aade5b4fcf Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 30 Nov 2020 20:57:40 +0000 Subject: [PATCH 08/10] We have no deprecated versions of Python now --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index dc1fdb5140f..78be52788a1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -496,7 +496,7 @@ 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), (3, 5)] + return sys.version_info[:2] in [] @pytest.fixture(scope="session") From 4f4cf38c4642b03492db39b52a7631695f305391 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sun, 20 Dec 2020 12:03:00 +0000 Subject: [PATCH 09/10] Update passage on Python 2 support --- docs/html/development/release-process.rst | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/docs/html/development/release-process.rst b/docs/html/development/release-process.rst index 91ce3e23379..17d11e7d1cf 100644 --- a/docs/html/development/release-process.rst +++ b/docs/html/development/release-process.rst @@ -70,16 +70,9 @@ their merits. Python 2 Support ---------------- -pip will continue to ensure that it runs on Python 2.7 after the `CPython 2.7 -EOL date`_. Support for Python 2.7 will be dropped, if bugs in Python 2.7 itself -make this necessary (which is unlikely) or in pip 21.0 (Jan 2021), whichever is -earlier. - -However, bugs reported with pip which only occur on Python 2.7 would likely not -be addressed directly by pip's maintainers. Pull Requests to fix Python 2.7 -only bugs will be considered, and merged (subject to normal review processes). -Note that there may be delays due to the lack of developer resources for -reviewing such pull requests. +pip 20.3 was the last version of pip that supported Python 2. Bugs reported +with pip which only occur on Python 2.7 will likely be closed as "won't fix" +issues by pip's maintainers. Python Support Policy --------------------- From c7a72060bac55df3be76f2e15bc5d3497de57dae Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sun, 20 Dec 2020 12:03:14 +0000 Subject: [PATCH 10/10] :newspaper: --- news/6148.removal.rst | 1 + news/9189.removal.rst | 1 + 2 files changed, 2 insertions(+) create mode 100644 news/6148.removal.rst create mode 100644 news/9189.removal.rst diff --git a/news/6148.removal.rst b/news/6148.removal.rst new file mode 100644 index 00000000000..cf6d85e70ba --- /dev/null +++ b/news/6148.removal.rst @@ -0,0 +1 @@ +Drop support for Python 2. diff --git a/news/9189.removal.rst b/news/9189.removal.rst new file mode 100644 index 00000000000..79928cbb15a --- /dev/null +++ b/news/9189.removal.rst @@ -0,0 +1 @@ +Drop support for Python 3.5.