Skip to content

gh-101100: Test docs in nit-picky mode #102513

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 13 commits into from
Mar 24, 2023
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
Document PyObject_ClearWeakRefs
  • Loading branch information
hugovk committed Mar 11, 2023
commit 1465769be3d869b2be2770ab9b81c85aafc40872
10 changes: 10 additions & 0 deletions Doc/c-api/weakref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,13 @@ as much as it can.
.. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref)

Similar to :c:func:`PyWeakref_GetObject`, but does no error checking.


.. c:function:: void PyObject_ClearWeakRefs(PyObject *object)

This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler
to clear weak references.

This iterates through the weak references for *object* and calls callbacks
for those references which have one. It returns when all callbacks have
been attempted.
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ Porting to Python 3.12
Classes declaring :const:`Py_TPFLAGS_MANAGED_DICT` should call
:c:func:`!_PyObject_VisitManagedDict` and :c:func:`!_PyObject_ClearManagedDict`
to traverse and clear their instance's dictionaries.
To clear weakrefs, call :c:func:`!PyObject_ClearWeakRefs`, as before.
To clear weakrefs, call :c:func:`PyObject_ClearWeakRefs`, as before.

* The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like
paths, like :class:`bytearray` and :class:`memoryview` types: only the exact
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy