Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for Python 3.8 #13190

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ichard26
Copy link
Member

@ichard26 ichard26 commented Jan 28, 2025

It's probably a good time to start considering dropping Python 3.8 support as it's been EOL for a few months now.

I've skimmed the output of pyupgrade using git add -p. There was one bad transformation involving a docstring, but other than that, it looks safe.

Towards #12989.

@ichard26
Copy link
Member Author

haha, of course Ruff is still complaining. I'll fix that later today.

@hugovk
Copy link
Contributor

hugovk commented Jan 28, 2025

A couple of other checks you could remove:

diff --git a/src/pip/_internal/locations/__init__.py b/src/pip/_internal/locations/__init__.py
index 0969502d6..d8c5f6a44 100644
--- a/src/pip/_internal/locations/__init__.py
+++ b/src/pip/_internal/locations/__init__.py
@@ -297,7 +297,7 @@ def get_scheme(
         if k == "platlib" and _looks_like_red_hat_lib():
             continue
 
-        # On Python 3.9+, sysconfig's posix_user scheme sets platlib against
+        # sysconfig's posix_user scheme sets platlib against
         # sys.platlibdir, but distutils's unix_user incorrectly coninutes
         # using the same $usersite for both platlib and purelib. This creates a
         # mismatch when sys.platlibdir is not "lib".
@@ -305,7 +305,6 @@ def get_scheme(
             user
             and k == "platlib"
             and not WINDOWS
-            and sys.version_info >= (3, 9)
             and _PLATLIBDIR != "lib"
             and _looks_like_bpo_44860()
         )
diff --git a/tests/functional/test_uninstall_user.py b/tests/functional/test_uninstall_user.py
index c49120ec2..664ba72da 100644
--- a/tests/functional/test_uninstall_user.py
+++ b/tests/functional/test_uninstall_user.py
@@ -79,7 +79,7 @@ class Tests_UninstallUserSite:
     @pytest.mark.xfail(
         sys.platform == "darwin"
         and platform.machine() == "arm64"
-        and sys.version_info[:2] in {(3, 8), (3, 9)},
+        and sys.version_info[:2] == (3, 9),
         reason="Unexpected egg-link install path",
     )
     def test_uninstall_editable_from_usersite(

@ichard26
Copy link
Member Author

ichard26 commented Jan 29, 2025

I'm not going to touch those as I'm not particularly confident about touching the locations code, and frankly, we can simply delete that test when Python 3.9 support is dropped. Thanks for bringing them up though!

@ichard26 ichard26 force-pushed the drop-python38-take-2 branch from 14ac796 to 371f588 Compare January 29, 2025 15:10
@ichard26 ichard26 marked this pull request as ready for review January 29, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants