The Steering Council has accepted Pablo's PEP 799!
Python 3.15 will get a new `profiling` module containing:
* `profiling.tracing`: deterministic function-call tracing (moved from `cProfile`, and `cProfile` kept as alias)
* `profiling.sampling`: new statistical sampling profiler
The old `profile` module will be deprecated in stages over 3.15-3.17.
PEP 799 – A dedicated profilers package for organizing Python profiling tool
Sampling profilers like this require a extremelly tight coupling with CPython internals. They depend on accessing low-level execution state with minimal overhead, supporting multi-threaded programs, free-threading, async code, and even remote attachment. All of this requires syncing the profilers AND the features, even between patch versions. Because of this deep integration, changes in CPython internals can easily break or degrade sampling profilers (this happens constantly and is very painf...