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

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

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Doc/deprecations/pending-removal-in-3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 3 additions & 0 deletions Doc/deprecations/pending-removal-in-3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions Doc/reference/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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__

Expand Down Expand Up @@ -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__
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document the deprecation of setting and using ``__package__`` and ``__cached__``.
Loading