https://github.com/python/cpython/commit/cf98f39103f476efd0bf7e9a4b36c3213354c7dd
commit: cf98f39103f476efd0bf7e9a4b36c3213354c7dd
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: Yhg1s <[email protected]>
date: 2024-09-27T18:53:35Z
summary:

[3.13] GH-65961: Document the deprecation of `__package__` and `__cached__` 
(GH-124377) (#124380)

* GH-65961: Document the deprecation of `__package__` and `__cached__` 
(GH-124377)

The code changes for warning related to `__package__` landed in Python 3.12. 
`__cached__` doesn't have any changes as it isn't used but only set by the 
import system.
(cherry picked from commit 67201ad53ff11576c69a9b762540b77128285f8d)

---------

Co-authored-by: Brett Cannon <[email protected]>
Co-authored-by: Barry Warsaw <[email protected]>

files:
A 
Misc/NEWS.d/next/Core_and_Builtins/2024-09-23-13-25-27.gh-issue-65961.LDqXV2.rst
M Doc/deprecations/pending-removal-in-3.14.rst
M Doc/deprecations/pending-removal-in-3.15.rst
M Doc/reference/import.rst

diff --git a/Doc/deprecations/pending-removal-in-3.14.rst 
b/Doc/deprecations/pending-removal-in-3.14.rst
index d1ad3300a9f6d2..330b426deac019 100644
--- a/Doc/deprecations/pending-removal-in-3.14.rst
+++ b/Doc/deprecations/pending-removal-in-3.14.rst
@@ -47,9 +47,6 @@ Pending Removal in Python 3.14
 * :mod:`email`: Deprecated the *isdst* parameter in 
:func:`email.utils.localtime`.
   (Contributed by Alan Williams in :gh:`72346`.)
 
-* :mod:`importlib`: ``__package__`` and ``__cached__`` will cease to be set or
-  taken into consideration by the import system (:gh:`97879`).
-
 * :mod:`importlib.abc` deprecated classes:
 
   * :class:`!importlib.abc.ResourceReader`
diff --git a/Doc/deprecations/pending-removal-in-3.15.rst 
b/Doc/deprecations/pending-removal-in-3.15.rst
index f7145a85bd2994..b921b4f97d524e 100644
--- a/Doc/deprecations/pending-removal-in-3.15.rst
+++ b/Doc/deprecations/pending-removal-in-3.15.rst
@@ -17,6 +17,9 @@ Pending Removal in Python 3.15
   * The :option:`!--cgi` flag to the :program:`python -m http.server`
     command-line interface has been deprecated since Python 3.13.
 
+* :mod:`importlib`: ``__package__`` and ``__cached__`` will cease to be set or
+  taken into consideration by the import system (:gh:`97879`).
+
 * :class:`locale`:
 
   * The :func:`~locale.getdefaultlocale` function
diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst
index 7de995b12702ec..19b8aa05072c73 100644
--- a/Doc/reference/import.rst
+++ b/Doc/reference/import.rst
@@ -596,6 +596,10 @@ listed below.
       Raise :exc:`DeprecationWarning` instead of :exc:`ImportWarning`
       when falling back to ``__package__``.
 
+   .. deprecated-removed:: 3.13 3.15
+      ``__package__`` will cease to be set or taken into consideration
+      by the import system or standard library.
+
 
 .. attribute:: __spec__
 
@@ -653,6 +657,10 @@ listed below.
    It is **strongly** recommended that you rely on :attr:`__spec__`
    instead of ``__cached__``.
 
+   .. deprecated-removed:: 3.13 3.15
+      ``__cached__`` will cease to be set or taken into consideration
+      by the import system or standard library.
+
 .. _package-path-rules:
 
 module.__path__
diff --git 
a/Misc/NEWS.d/next/Core_and_Builtins/2024-09-23-13-25-27.gh-issue-65961.LDqXV2.rst
 
b/Misc/NEWS.d/next/Core_and_Builtins/2024-09-23-13-25-27.gh-issue-65961.LDqXV2.rst
new file mode 100644
index 00000000000000..9f8c228e8bce6a
--- /dev/null
+++ 
b/Misc/NEWS.d/next/Core_and_Builtins/2024-09-23-13-25-27.gh-issue-65961.LDqXV2.rst
@@ -0,0 +1 @@
+Document the deprecation of setting and using ``__package__`` and 
``__cached__``.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to