@@ -935,42 +935,15 @@ webbrowser
935
935
Others
936
936
------
937
937
938
- TODO
938
+ * None yet
939
939
940
940
Porting to Python 3.13
941
941
======================
942
942
943
943
This section lists previously described changes and other bugfixes
944
944
that may require changes to your code.
945
945
946
- * The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and ``Py_TRASHCAN_SAFE_END ``
947
- were removed. They should be replaced by the new macros ``Py_TRASHCAN_BEGIN ``
948
- and ``Py_TRASHCAN_END ``.
949
-
950
- A tp_dealloc function that has the old macros, such as::
951
-
952
- static void
953
- mytype_dealloc(mytype *p)
954
- {
955
- PyObject_GC_UnTrack(p);
956
- Py_TRASHCAN_SAFE_BEGIN(p);
957
- ...
958
- Py_TRASHCAN_SAFE_END
959
- }
960
-
961
- should migrate to the new macros as follows::
962
-
963
- static void
964
- mytype_dealloc(mytype *p)
965
- {
966
- PyObject_GC_UnTrack(p);
967
- Py_TRASHCAN_BEGIN(p, mytype_dealloc)
968
- ...
969
- Py_TRASHCAN_END
970
- }
971
-
972
- Note that ``Py_TRASHCAN_BEGIN `` has a second argument which
973
- should be the deallocation function it is in.
946
+ * None yet
974
947
975
948
976
949
Build Changes
@@ -1166,6 +1139,35 @@ Porting to Python 3.13
1166
1139
are now undefined by ``<Python.h> ``.
1167
1140
(Contributed by Victor Stinner in :gh: `85283 `.)
1168
1141
1142
+ * The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and ``Py_TRASHCAN_SAFE_END ``
1143
+ were removed. They should be replaced by the new macros ``Py_TRASHCAN_BEGIN ``
1144
+ and ``Py_TRASHCAN_END ``.
1145
+
1146
+ A tp_dealloc function that has the old macros, such as::
1147
+
1148
+ static void
1149
+ mytype_dealloc(mytype *p)
1150
+ {
1151
+ PyObject_GC_UnTrack(p);
1152
+ Py_TRASHCAN_SAFE_BEGIN(p);
1153
+ ...
1154
+ Py_TRASHCAN_SAFE_END
1155
+ }
1156
+
1157
+ should migrate to the new macros as follows::
1158
+
1159
+ static void
1160
+ mytype_dealloc(mytype *p)
1161
+ {
1162
+ PyObject_GC_UnTrack(p);
1163
+ Py_TRASHCAN_BEGIN(p, mytype_dealloc)
1164
+ ...
1165
+ Py_TRASHCAN_END
1166
+ }
1167
+
1168
+ Note that ``Py_TRASHCAN_BEGIN `` has a second argument which
1169
+ should be the deallocation function it is in.
1170
+
1169
1171
* The :c:func: `PyUnicode_AsUTF8 ` function now raises an exception if the string
1170
1172
contains embedded null characters. To accept embedded null characters and
1171
1173
truncate on purpose at the first null byte,
0 commit comments