@@ -75,6 +75,8 @@ Summary -- Release highlights
7575 profiling tools <whatsnew315-profiling-package>`
7676* :pep: `799 `: :ref: `Tachyon: High frequency statistical sampling profiler
7777 <whatsnew315-sampling-profiler>`
78+ * :pep: `831 `: :ref: `Frame pointers are enabled by default for improved
79+ system-level observability <whatsnew315-pep831>`
7880* :pep: `798 `: :ref: `Unpacking in comprehensions
7981 <whatsnew315-unpacking-in-comprehensions>`
8082* :pep: `686 `: :ref: `Python now uses UTF-8 as the default encoding
@@ -86,7 +88,6 @@ Summary -- Release highlights
8688* :pep: `782 `: :ref: `A new PyBytesWriter C API to create a Python bytes object
8789 <whatsnew315-pybyteswriter>`
8890* :pep: `803 `: :ref: `Stable ABI for Free-Threaded Builds <whatsnew315-abi3t >`
89- * :pep: `831 `: :ref: `Frame pointers everywhere <whatsnew315-frame-pointers >`
9091* :ref: `The JIT compiler has been significantly upgraded <whatsnew315-jit >`
9192* :ref: `Improved error messages <whatsnew315-improved-error-messages >`
9293* :ref: `The official Windows 64-bit binaries now use the tail-calling interpreter
@@ -376,6 +377,39 @@ available output formats, profiling modes, and configuration options.
376377(Contributed by Pablo Galindo and László Kiss Kollár in :gh: `135953 ` and :gh: `138122 `.)
377378
378379
380+ .. _whatsnew315-pep831 :
381+
382+ :pep: `831 `: Frame pointers enabled by default
383+ ---------------------------------------------
384+
385+ CPython is now built with frame pointers by default on platforms that support
386+ them. This uses the compiler flags ``-fno-omit-frame-pointer `` and
387+ ``-mno-omit-leaf-frame-pointer ``, making native stack unwinding faster and
388+ more reliable for system profilers, debuggers, crash analysis tools, and
389+ eBPF-based observability tools.
390+
391+ The flags are exposed through :mod: `sysconfig `, so extension modules built by
392+ tools that consume Python's build configuration inherit frame pointers by
393+ default. This propagation is intentional: mixed Python/native profiling needs
394+ an unbroken frame-pointer chain through the interpreter, extension modules,
395+ embedding applications, and native libraries.
396+
397+ .. important ::
398+
399+ Third-party build backends and native build systems should preserve these
400+ flags when they consume Python's :mod: `sysconfig ` values. Build systems
401+ that compile C, C++, Rust, or other native code without inheriting Python's
402+ compiler flags should enable equivalent frame-pointer flags themselves. A
403+ single native component built without frame pointers can break stack
404+ unwinding for the whole Python process.
405+
406+ .. seealso :: :pep:`831` for further details.
407+
408+ (Contributed by Pablo Galindo Salgado and Savannah Ostrowski in
409+ :gh: `149201 `; PEP 831 written by Pablo Galindo Salgado, Ken Jin, and
410+ Savannah Ostrowski.)
411+
412+
379413.. _whatsnew315-unpacking-in-comprehensions :
380414
381415:pep: `798 `: Unpacking in Comprehensions
@@ -2378,16 +2412,6 @@ Build changes
23782412 and :option: `-X dev <-X> ` is passed to the Python or Python is built in :ref: `debug mode <debug-build >`.
23792413 (Contributed by Donghee Na in :gh: `141770 `.)
23802414
2381- .. _whatsnew315-frame-pointers :
2382-
2383- * CPython is now built with frame pointers enabled by default
2384- (:pep: `831 `). Pass :option: `--without-frame-pointers ` to opt out.
2385- Authors of C extensions and native libraries built with custom build
2386- systems should add ``-fno-omit-frame-pointer `` and
2387- ``-mno-omit-leaf-frame-pointer `` to their own ``CFLAGS `` to keep the
2388- unwind chain intact.
2389- (Contributed by Pablo Galindo Salgado and Savannah Ostrowski in :gh: `149201 `.)
2390-
23912415.. _whatsnew315-windows-tail-calling-interpreter :
23922416
23932417* 64-bit builds using Visual Studio 2026 (MSVC 18) may now use the new
0 commit comments