File tree Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -1260,7 +1260,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
1260
1260
This bit indicates that instances of the class have a :attr: `~object.__dict__ `
1261
1261
attribute, and that the space for the dictionary is managed by the VM.
1262
1262
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.
1264
1264
1265
1265
The type traverse function must call :c:func: `PyObject_VisitManagedDict `
1266
1266
and its clear function must call :c:func: `PyObject_ClearManagedDict `.
@@ -1278,7 +1278,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
1278
1278
This bit indicates that instances of the class should be weakly
1279
1279
referenceable.
1280
1280
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.
1282
1282
1283
1283
.. versionadded :: 3.12
1284
1284
Original file line number Diff line number Diff line change @@ -785,13 +785,6 @@ New features
785
785
(Contributed by Victor Stinner in :gh: `129813 `.)
786
786
787
787
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
-
795
788
796
789
Porting to Python 3.15
797
790
----------------------
Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ given type object has a specified feature.
529
529
#define Py_TPFLAGS_INLINE_VALUES (1 << 2)
530
530
531
531
/* 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.
533
533
*/
534
534
#define Py_TPFLAGS_MANAGED_WEAKREF (1 << 3)
535
535
You can’t perform that action at this time.
0 commit comments