[Python-checkins] bpo-42135 Correct version slated for importlib.find_loader removal (GH-28312) (GH-28321)

brettcannon webhook-mailer at python.org
Mon Sep 13 19:33:14 EDT 2021


https://github.com/python/cpython/commit/a390bb6d66027517498e75b6b91a91be5f136d28
commit: a390bb6d66027517498e75b6b91a91be5f136d28
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: brettcannon <brett at python.org>
date: 2021-09-13T16:33:05-07:00
summary:

bpo-42135 Correct version slated for importlib.find_loader removal (GH-28312) (GH-28321)

importlib.find_loader should also be slated for 3.12 like the others in GH-25169 and as documented in https://docs.python.org/3.11/whatsnew/3.10.htmlGH-deprecated.
(cherry picked from commit 9f93018b69d72cb48d3444554261ae3b0ea00c93)

Co-authored-by: Hugo van Kemenade <hugovk at users.noreply.github.com>

Co-authored-by: Hugo van Kemenade <hugovk at users.noreply.github.com>

files:
A Misc/NEWS.d/next/Library/2021-09-13-19-32-58.bpo-42135.1ZAHqR.rst
M Lib/importlib/__init__.py

diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py
index a510f08db48a8..ce61883288aa3 100644
--- a/Lib/importlib/__init__.py
+++ b/Lib/importlib/__init__.py
@@ -79,7 +79,7 @@ def find_loader(name, path=None):
 
     """
     warnings.warn('Deprecated since Python 3.4 and slated for removal in '
-                  'Python 3.10; use importlib.util.find_spec() instead',
+                  'Python 3.12; use importlib.util.find_spec() instead',
                   DeprecationWarning, stacklevel=2)
     try:
         loader = sys.modules[name].__loader__
diff --git a/Misc/NEWS.d/next/Library/2021-09-13-19-32-58.bpo-42135.1ZAHqR.rst b/Misc/NEWS.d/next/Library/2021-09-13-19-32-58.bpo-42135.1ZAHqR.rst
new file mode 100644
index 0000000000000..983b46e140e74
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-09-13-19-32-58.bpo-42135.1ZAHqR.rst
@@ -0,0 +1,3 @@
+Fix typo: ``importlib.find_loader`` is really slated for removal in Python 3.12 not 3.10, like the others in GH-25169.
+
+Patch by Hugo van Kemenade.



More information about the Python-checkins mailing list