Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Doc/c-api/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ macros.

This is not compatible with subinterpreters.

.. versionchanged:: 3.15

This macro is now thread safe.

.. c:type:: PyDateTime_CAPI
Structure containing the fields for the datetime C API.
Expand All @@ -44,6 +48,11 @@ macros.

This variable is only available once :c:macro:`PyDateTime_IMPORT` succeeds.

.. versionchanged:: 3.15

This variable should not be accessed directly as direct access is not thread-safe.
Use :c:func:`PyDateTime_IMPORT` instead.

.. c:type:: PyDateTime_Date
This subtype of :c:type:`PyObject` represents a Python date object.
Expand Down
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,8 @@ New features
thread state.
(Contributed by Victor Stinner in :gh:`139653`.)

* Add :c:func:`PyUnstable_SetImmortal` C-API function to mark objects as :term:`immortal`.
(Contributed by Kumar Aditya in :gh:`143300`.)

Changed C APIs
--------------
Expand All @@ -1571,6 +1573,9 @@ Changed C APIs
flag is set then :c:macro:`Py_TPFLAGS_HAVE_GC` must be set too.
(Contributed by Sergey Miryanov in :gh:`134786`.)

* :c:macro:`PyDateTime_IMPORT` is now thread safe. Code that directly checks ``PyDateTimeAPI``
for ``NULL`` should be updated to call :c:macro:`PyDateTime_IMPORT` instead.
(Contributed by Kumar Aditya in :gh:`141563`.)

Porting to Python 3.15
----------------------
Expand Down
Loading