Support for Python 3.15 `profiling.sampling`?

Author: rh-spCreated Oct 21, 2025Updated Oct 24, 2025

Python 3.15, currently in alpha, is planned to include a new built-in sampling profiler. The What's new page, perhaps misleadingly, attributes it to PEP 799, but the PEP itself doesn't actually describe the profiler, just suggests a new naming scheme for profilers / deprecation of old profile.

The profiling.sampling profiler contains an option to output "collapsed stack traces for flamegraphs." It would be fantastic if this format was supported by Speedscope.

  • If it is a common format that is already supported, the new profiler could be added to the list of supported profilers in the README.
  • Otherwise, maybe this new format could be added to Speedscope as a new feature.
  • If neither, maybe one of the existing Python profilers exporting Speedscope compatible data could use profiling.sampling as a new backend.

What is the best approach here?