diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index d0a3d9d578e0cd..e4cef1f3e3b7c0 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1237,8 +1237,8 @@ find and load modules. .. attribute:: has_location ``True`` if the spec's :attr:`origin` refers to a loadable location, - ``False`` otherwise. This value impacts how :attr:`origin` is interpreted - and how the module's :attr:`__file__` is populated. + ``False`` otherwise. This value impacts how :attr:`origin` is interpreted + and how the module's :attr:`__file__` is populated. .. class:: AppleFrameworkLoader(name, path) diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst index 7de995b12702ec..fd3e1f9c3cf2d0 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 + ``__package__`` 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..d380027f3c5776 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-09-23-13-25-27.gh-issue-65961.LDqXV2.rst @@ -0,0 +1 @@ +Deprecate the setting and using ``__package__`` and ``__cached__``.