@@ -932,47 +932,15 @@ webbrowser
932
932
Others
933
933
------
934
934
935
- * Remove the old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and
936
- ``Py_TRASHCAN_SAFE_END ``. They should be replaced by the new macros
937
- ``Py_TRASHCAN_BEGIN `` and ``Py_TRASHCAN_END ``. The new macros were
938
- added in Python 3.8 and the old macros were deprecated in Python 3.11.
939
- (Contributed by Irit Katriel in :gh: `105111 `.)
940
-
935
+ * None yet
941
936
942
937
Porting to Python 3.13
943
938
======================
944
939
945
940
This section lists previously described changes and other bugfixes
946
941
that may require changes to your code.
947
942
948
- * The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and ``Py_TRASHCAN_SAFE_END ``
949
- were removed. They should be replaced by the new macros ``Py_TRASHCAN_BEGIN ``
950
- and ``Py_TRASHCAN_END ``.
951
-
952
- A tp_dealloc function that has the old macros, such as::
953
-
954
- static void
955
- mytype_dealloc(mytype *p)
956
- {
957
- PyObject_GC_UnTrack(p);
958
- Py_TRASHCAN_SAFE_BEGIN(p);
959
- ...
960
- Py_TRASHCAN_SAFE_END
961
- }
962
-
963
- should migrate to the new macros as follows::
964
-
965
- static void
966
- mytype_dealloc(mytype *p)
967
- {
968
- PyObject_GC_UnTrack(p);
969
- Py_TRASHCAN_BEGIN(p, mytype_dealloc)
970
- ...
971
- Py_TRASHCAN_END
972
- }
973
-
974
- Note that ``Py_TRASHCAN_BEGIN `` has a second argument which
975
- should be the deallocation function it is in.
943
+ * None yet
976
944
977
945
978
946
Build Changes
@@ -1168,6 +1136,35 @@ Porting to Python 3.13
1168
1136
are now undefined by ``<Python.h> ``.
1169
1137
(Contributed by Victor Stinner in :gh: `85283 `.)
1170
1138
1139
+ * The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and ``Py_TRASHCAN_SAFE_END ``
1140
+ were removed. They should be replaced by the new macros ``Py_TRASHCAN_BEGIN ``
1141
+ and ``Py_TRASHCAN_END ``.
1142
+
1143
+ A tp_dealloc function that has the old macros, such as::
1144
+
1145
+ static void
1146
+ mytype_dealloc(mytype *p)
1147
+ {
1148
+ PyObject_GC_UnTrack(p);
1149
+ Py_TRASHCAN_SAFE_BEGIN(p);
1150
+ ...
1151
+ Py_TRASHCAN_SAFE_END
1152
+ }
1153
+
1154
+ should migrate to the new macros as follows::
1155
+
1156
+ static void
1157
+ mytype_dealloc(mytype *p)
1158
+ {
1159
+ PyObject_GC_UnTrack(p);
1160
+ Py_TRASHCAN_BEGIN(p, mytype_dealloc)
1161
+ ...
1162
+ Py_TRASHCAN_END
1163
+ }
1164
+
1165
+ Note that ``Py_TRASHCAN_BEGIN `` has a second argument which
1166
+ should be the deallocation function it is in.
1167
+
1171
1168
* The :c:func: `PyUnicode_AsUTF8 ` function now raises an exception if the string
1172
1169
contains embedded null characters. To accept embedded null characters and
1173
1170
truncate on purpose at the first null byte,
@@ -1302,6 +1299,12 @@ Removed
1302
1299
Configuration <init-config>` instead (:pep: `587 `), added to Python 3.8.
1303
1300
(Contributed by Victor Stinner in :gh: `105145 `.)
1304
1301
1302
+ * Remove the old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN `` and
1303
+ ``Py_TRASHCAN_SAFE_END ``. They should be replaced by the new macros
1304
+ ``Py_TRASHCAN_BEGIN `` and ``Py_TRASHCAN_END ``. The new macros were
1305
+ added in Python 3.8 and the old macros were deprecated in Python 3.11.
1306
+ (Contributed by Irit Katriel in :gh: `105111 `.)
1307
+
1305
1308
* Remove ``PyEval_InitThreads() `` and ``PyEval_ThreadsInitialized() ``
1306
1309
functions, deprecated in Python 3.9. Since Python 3.7, ``Py_Initialize() ``
1307
1310
always creates the GIL: calling ``PyEval_InitThreads() `` did nothing and
0 commit comments