which has an ambiguous return value.
(Contributed by Irit Katriel and Erlend Aasland in :gh:`105201`.)
-* :c:func:`Py_Finalize` now deletes all interned strings. This
- is backwards incompatible to any C-Extension that holds onto an interned
- string after a call to :c:func:`Py_Finalize` and is then reused after a
- call to :c:func:`Py_Initialize`. Any issues arising from this behavior will
- normally result in crashes during the execution of the subsequent call to
- :c:func:`Py_Initialize` from accessing uninitialized memory. To fix, use
- an address sanitizer to identify any use-after-free coming from
- an interned string and deallocate it during module shutdown.
- (Contributed by Eddie Elizondo in :gh:`113601`.)
-
* Add :c:func:`PyLong_IsPositive`, :c:func:`PyLong_IsNegative`
and :c:func:`PyLong_IsZero` for checking if :c:type:`PyLongObject`
is positive, negative, or zero, respectively.
test if two strings are equal.
(Contributed by Victor Stinner in :gh:`124502`.)
-
* Add :c:func:`PyType_Freeze` function to make a type immutable.
(Contributed by Victor Stinner in :gh:`121654`.)
* Add :c:func:`PyUnstable_Object_EnableDeferredRefcount` for enabling
deferred reference counting, as outlined in :pep:`703`.
-* The :ref:`Unicode Exception Objects <unicodeexceptions>` C API
- now raises a :exc:`TypeError` if its exception argument is not
- a :exc:`UnicodeError` object.
- (Contributed by Bénédikt Tran in :gh:`127691`.)
-
* Add :c:func:`PyMonitoring_FireBranchLeftEvent` and
:c:func:`PyMonitoring_FireBranchRightEvent` for generating
:monitoring-event:`BRANCH_LEFT` and :monitoring-event:`BRANCH_RIGHT`
for debugging purposes.
-Porting to Python 3.14
-----------------------
+Limited C API changes
+---------------------
* In the limited C API 3.14 and newer, :c:func:`Py_TYPE` and
:c:func:`Py_REFCNT` are now implemented as an opaque function call to hide
implementation details.
(Contributed by Victor Stinner in :gh:`120600` and :gh:`124127`.)
+
+Porting to Python 3.14
+----------------------
+
+* :c:func:`Py_Finalize` now deletes all interned strings. This
+ is backwards incompatible to any C-Extension that holds onto an interned
+ string after a call to :c:func:`Py_Finalize` and is then reused after a
+ call to :c:func:`Py_Initialize`. Any issues arising from this behavior will
+ normally result in crashes during the execution of the subsequent call to
+ :c:func:`Py_Initialize` from accessing uninitialized memory. To fix, use
+ an address sanitizer to identify any use-after-free coming from
+ an interned string and deallocate it during module shutdown.
+ (Contributed by Eddie Elizondo in :gh:`113601`.)
+
+* The :ref:`Unicode Exception Objects <unicodeexceptions>` C API
+ now raises a :exc:`TypeError` if its exception argument is not
+ a :exc:`UnicodeError` object.
+ (Contributed by Bénédikt Tran in :gh:`127691`.)
+
* Private functions promoted to public C APIs:
* ``_PyBytes_Join()``: :c:func:`PyBytes_Join`;
.. Add C API deprecations above alphabetically, not here at the end.
-.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
-
-.. include:: ../deprecations/c-api-pending-removal-in-3.18.rst
-
-.. include:: ../deprecations/c-api-pending-removal-in-future.rst
-
* The ``PyMonitoring_FireBranchEvent`` function is deprecated and should
be replaced with calls to :c:func:`PyMonitoring_FireBranchLeftEvent`
and :c:func:`PyMonitoring_FireBranchRightEvent`.
(Contributed by Victor Stinner in :gh:`128863`.)
+.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
+
+.. include:: ../deprecations/c-api-pending-removal-in-3.18.rst
+
+.. include:: ../deprecations/c-api-pending-removal-in-future.rst
+
+
Removed
-------
* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
bases was deprecated since 3.12 and now raises a :exc:`TypeError`.
+* Remove ``PyDictObject.ma_version_tag`` member which was deprecated since
+ Python 3.12. Use the :c:func:`PyDict_AddWatcher` API instead.
+ (Contributed by Sam Gross in :gh:`124296`.)
+
* Remove the private ``_Py_InitializeMain()`` function. It was a
:term:`provisional API` added to Python 3.8 by :pep:`587`.
(Contributed by Victor Stinner in :gh:`129033`.)