https://github.com/python/cpython/commit/f278b8fefca7ad5d0e95c4b5df39807a80cf821a
commit: f278b8fefca7ad5d0e95c4b5df39807a80cf821a
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: encukou <[email protected]>
date: 2024-04-19T11:44:19+02:00
summary:

[3.12] gh-116935: Document that heap types need to support garbage collection 
(GH-118021) (GH-118092)

gh-116935: Document that heap types need to support garbage collection 
(GH-118021)
(cherry picked from commit 5d544365742a117027747306e2d4473f3b73d921)

Co-authored-by: Savannah Ostrowski <[email protected]>

files:
M Doc/c-api/typeobj.rst

diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index b30c22f4fddeba..f6d865f2f52219 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -1052,7 +1052,8 @@ and :c:data:`PyType_Type` effectively act as defaults.)
       the type, and the type object is INCREF'ed when a new instance is 
created, and
       DECREF'ed when an instance is destroyed (this does not apply to 
instances of
       subtypes; only the type referenced by the instance's ob_type gets 
INCREF'ed or
-      DECREF'ed).
+      DECREF'ed). Heap types should also :ref:`support garbage collection 
<supporting-cycle-detection>`
+      as they can form a reference cycle with their own module object.
 
       **Inheritance:**
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to