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