@@ -920,42 +920,15 @@ webbrowser
920
920
Others
921
921
------
922
922
923
- TODO
923
+ * None yet
924
924
925
925
Porting to Python 3.13
926
926
======================
927
927
928
928
This section lists previously described changes and other bugfixes
929
929
that may require changes to your code.
930
930
931
- * The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and ``Py_TRASHCAN_SAFE_END ``
932
- were removed. They should be replaced by the new macros ``Py_TRASHCAN_BEGIN ``
933
- and ``Py_TRASHCAN_END ``.
934
-
935
- A tp_dealloc function that has the old macros, such as::
936
-
937
- static void
938
- mytype_dealloc(mytype *p)
939
- {
940
- PyObject_GC_UnTrack(p);
941
- Py_TRASHCAN_SAFE_BEGIN(p);
942
- ...
943
- Py_TRASHCAN_SAFE_END
944
- }
945
-
946
- should migrate to the new macros as follows::
947
-
948
- static void
949
- mytype_dealloc(mytype *p)
950
- {
951
- PyObject_GC_UnTrack(p);
952
- Py_TRASHCAN_BEGIN(p, mytype_dealloc)
953
- ...
954
- Py_TRASHCAN_END
955
- }
956
-
957
- Note that ``Py_TRASHCAN_BEGIN `` has a second argument which
958
- should be the deallocation function it is in.
931
+ * None yet
959
932
960
933
961
934
Build Changes
@@ -1141,6 +1114,35 @@ Porting to Python 3.13
1141
1114
are now undefined by ``<Python.h> ``.
1142
1115
(Contributed by Victor Stinner in :gh: `85283 `.)
1143
1116
1117
+ * The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and ``Py_TRASHCAN_SAFE_END ``
1118
+ were removed. They should be replaced by the new macros ``Py_TRASHCAN_BEGIN ``
1119
+ and ``Py_TRASHCAN_END ``.
1120
+
1121
+ A tp_dealloc function that has the old macros, such as::
1122
+
1123
+ static void
1124
+ mytype_dealloc(mytype *p)
1125
+ {
1126
+ PyObject_GC_UnTrack(p);
1127
+ Py_TRASHCAN_SAFE_BEGIN(p);
1128
+ ...
1129
+ Py_TRASHCAN_SAFE_END
1130
+ }
1131
+
1132
+ should migrate to the new macros as follows::
1133
+
1134
+ static void
1135
+ mytype_dealloc(mytype *p)
1136
+ {
1137
+ PyObject_GC_UnTrack(p);
1138
+ Py_TRASHCAN_BEGIN(p, mytype_dealloc)
1139
+ ...
1140
+ Py_TRASHCAN_END
1141
+ }
1142
+
1143
+ Note that ``Py_TRASHCAN_BEGIN `` has a second argument which
1144
+ should be the deallocation function it is in.
1145
+
1144
1146
Deprecated
1145
1147
----------
1146
1148
0 commit comments