Skip to content

bpo-40895: Update weakref documentation to remove old warnings #20687

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
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
16 changes: 0 additions & 16 deletions Doc/library/weakref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,6 @@ Extension types can easily be made to support weak references; see
application without adding attributes to those objects. This can be especially
useful with objects that override attribute accesses.

.. note::

Caution: Because a :class:`WeakKeyDictionary` is built on top of a Python
dictionary, it must not change size when iterating over it. This can be
difficult to ensure for a :class:`WeakKeyDictionary` because actions
performed by the program during iteration may cause items in the
dictionary to vanish "by magic" (as a side effect of garbage collection).

.. versionchanged:: 3.9
Added support for ``|`` and ``|=`` operators, specified in :pep:`584`.

Expand All @@ -192,14 +184,6 @@ than needed.
Mapping class that references values weakly. Entries in the dictionary will be
discarded when no strong reference to the value exists any more.

.. note::

Caution: Because a :class:`WeakValueDictionary` is built on top of a Python
dictionary, it must not change size when iterating over it. This can be
difficult to ensure for a :class:`WeakValueDictionary` because actions performed
by the program during iteration may cause items in the dictionary to vanish "by
magic" (as a side effect of garbage collection).

.. versionchanged:: 3.9
Added support for ``|`` and ``|=`` operators, as specified in :pep:`584`.

Expand Down