Skip to content
Open
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
6 changes: 4 additions & 2 deletions Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,11 @@ See also the :ref:`Python Development Mode <devmode>` and the
:option:`--with-trace-refs` configure option.

.. versionchanged:: 3.8
Release builds and debug builds are now ABI compatible: defining the
Release builds are now ABI compatible with debug builds: defining the
``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` macro (see the
:option:`--with-trace-refs` option).
:option:`--with-trace-refs` option). However, debug builds still expose
more symbols than release builds and code built against a debug build is not
necessarily compatible with a release build.


Debug options
Expand Down
17 changes: 9 additions & 8 deletions Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,15 @@ subdirectories).
Debug build uses the same ABI as release build
-----------------------------------------------

Python now uses the same ABI whether it's built in release or debug mode. On
Unix, when Python is built in debug mode, it is now possible to load C
extensions built in release mode and C extensions built using the stable ABI.

Release builds and :ref:`debug builds <debug-build>` are now ABI compatible: defining the
``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` macro, which
introduces the only ABI incompatibility. The ``Py_TRACE_REFS`` macro, which
adds the :func:`sys.getobjects` function and the :envvar:`PYTHONDUMPREFS`
The ABI of Python :ref:`debug builds <debug-build>` is now compatible with
Python release builds. On Unix, when Python is built in debug mode, it is now
possible to load C extensions built in release mode and C extensions built
using the stable ABI. The inverse is not true, as debug builds expose
additional symbols not available in release builds.

Defining the ``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` macro,
which introduces the only ABI incompatibility. The ``Py_TRACE_REFS`` macro,
which adds the :func:`sys.getobjects` function and the :envvar:`PYTHONDUMPREFS`
environment variable, can be set using the new :option:`./configure
--with-trace-refs <--with-trace-refs>` build option.
(Contributed by Victor Stinner in :issue:`36465`.)
Expand Down
Loading