8000 gh-101100: Consolidate documentation on `ModuleType` attributes by AlexWaygood · Pull Request #124709 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101100: Consolidate documentation on ModuleType attributes #124709

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

Merged
merged 16 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
More deprecation warning improvements
  • Loading branch information
AlexWaygood committed Oct 9, 2024
commit 2dca569262d7dd215e6276ad964f1145db47e594
10 changes: 6 additions & 4 deletions Doc/deprecations/pending-removal-in-3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ Pending Removal in Python 3.15
* Setting :attr:`~module.__cached__` on a module while
failing to set :attr:`__spec__.cached <importlib.machinery.ModuleSpec.cached>`
is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or
take into consideration by the import system or standard library.
take into consideration by the import system or standard library. (:gh:`97879`)

* Setting :attr:`~module.__package__` on a module while
failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or
take into consideration by the import system or standard library. (:gh:`97879`)

* :mod:`ctypes`:

Expand All @@ -24,9 +29,6 @@ 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
13 changes: 7 additions & 6 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1309,14 +1309,15 @@
may be removed in a future version of Python. Use the single-arg versions
of these functions instead. (Contributed by Ofey Chan in :gh:`89874`.)

* :exc:`DeprecationWarning` is now raised when ``__package__`` on a
module differs from ``__spec__.parent`` (previously it was
:exc:`ImportWarning`).
* :exc:`DeprecationWarning` is now raised when :attr:`~module.__package__` on a
module differs from
:attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>` (previously
it was :exc:`ImportWarning`).
(Contributed by Brett Cannon in :gh:`65961`.)

* Setting ``__package__`` or ``__cached__`` on a module is deprecated,
and will cease to be set or taken into consideration by the import system in Python 3.14.
(Contributed by Brett Cannon in :gh:`65961`.)
* Setting :attr:`~module.__package__`` or :attr:`~module.__cached__` on a

Check warning on line 1318 in Doc/whatsnew/3.12.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:attr reference target not found: module.__package__` [ref.attr]
module is deprecated, and will cease to be set or taken into consideration by
the import system in Python 3.14. (Contributed by Brett Cannon in :gh:`65961`.)

* The bitwise inversion operator (``~``) on bool is deprecated. It will throw an
error in Python 3.16. Use ``not`` for logical negation of bools instead.
Expand Down
Loading
0