Skip to content

Commit 6dbabaf

Browse files
Update docs according review's feedback
1 parent 10fce20 commit 6dbabaf

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
12601260
This bit indicates that instances of the class have a :attr:`~object.__dict__`
12611261
attribute, and that the space for the dictionary is managed by the VM.
12621262

1263-
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set.
1263+
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` must also be set.
12641264

12651265
The type traverse function must call :c:func:`PyObject_VisitManagedDict`
12661266
and its clear function must call :c:func:`PyObject_ClearManagedDict`.
@@ -1278,7 +1278,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
12781278
This bit indicates that instances of the class should be weakly
12791279
referenceable.
12801280

1281-
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set.
1281+
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` must also be set.
12821282

12831283
.. versionadded:: 3.12
12841284

Doc/whatsnew/3.15.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -785,13 +785,6 @@ New features
785785
(Contributed by Victor Stinner in :gh:`129813`.)
786786

787787

788-
Limited C API changes
789-
---------------------
790-
791-
* If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF`
792-
flags are set then :c:macro:`Py_TPFLAGS_HAVE_GC` should be set too.
793-
(Contributed by Sergey Miryanov in :gh:`134786`)
794-
795788

796789
Porting to Python 3.15
797790
----------------------

Include/object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ given type object has a specified feature.
529529
#define Py_TPFLAGS_INLINE_VALUES (1 << 2)
530530

531531
/* Placement of weakref pointers are managed by the VM, not by the type.
532-
* The VM will automatically set tp_weaklistoffset. Implies Py_TPFLAGS_HAVE_GC.
532+
* The VM will automatically set tp_weaklistoffset.
533533
*/
534534
#define Py_TPFLAGS_MANAGED_WEAKREF (1 << 3)
535535

0 commit comments

Comments
 (0)