]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Postpone `module.__loader__` deprecation to Python 3.16 (GH-126482) (#126637)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 10 Nov 2024 00:57:54 +0000 (01:57 +0100)
committerGitHub <noreply@github.com>
Sun, 10 Nov 2024 00:57:54 +0000 (00:57 +0000)
Postpone `module.__loader__` deprecation to Python 3.16 (GH-126482)
(cherry picked from commit 450db61a78989c5a1f1106be01e071798c783cf9)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/deprecations/pending-removal-in-3.14.rst
Doc/deprecations/pending-removal-in-3.16.rst
Doc/reference/datamodel.rst

index 0e6a100574c3be44a6cecd3721e28b7212b88a2b..b506b0f02fbf5302e29e4a851f9c5e14de56143d 100644 (file)
@@ -1,13 +1,6 @@
 Pending Removal in Python 3.14
 ------------------------------
 
-* The import system:
-
-  * Setting :attr:`~module.__loader__` on a module while
-    failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
-    is deprecated. In Python 3.14, :attr:`!__loader__` will cease to be set or
-    taken into consideration by the import system or the standard library.
-
 * :mod:`argparse`: The *type*, *choices*, and *metavar* parameters
   of :class:`!argparse.BooleanOptionalAction` are deprecated
   and will be removed in 3.14.
index 82d400915768151923896e9861a5249237837f10..f59a40373e48a8af11fb95260404e77f155d388f 100644 (file)
@@ -1,6 +1,13 @@
 Pending Removal in Python 3.16
 ------------------------------
 
+* The import system:
+
+  * Setting :attr:`~module.__loader__` on a module while
+    failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
+    is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or
+    taken into consideration by the import system or the standard library.
+
 * :mod:`array`:
   :class:`array.array` ``'u'`` type (:c:type:`wchar_t`):
   use the ``'w'`` type instead (``Py_UCS4``).
index bdb83790653661527fe58201b2a9072806e369a3..e19a365fa4bd094202547a133379327477c20663 100644 (file)
@@ -1007,9 +1007,9 @@ this approach.
       using the :class:`types.ModuleType` constructor.
       Previously the attribute was optional.
 
-   .. deprecated-removed:: 3.12 3.14
+   .. deprecated-removed:: 3.12 3.16
       Setting :attr:`!__loader__` on a module while failing to set
-      :attr:`!__spec__.loader` is deprecated. In Python 3.14,
+      :attr:`!__spec__.loader` is deprecated. In Python 3.16,
       :attr:`!__loader__` will cease to be set or taken into consideration by
       the import system or the standard library.