Following PEP 799, there will be a new profiling module in Python 3.15 (coming this autumn), consisting of:
profiling.tracing: previously available as the cProfile module
profiling.sampling: a new sampling-based profiler with lots of powerful features (e.g. support for subprocesses, multiple output formats including flame graph and line-level heatmaps)
Since the cProfile module will remain available as an alias indefinitely, there’s no urgent need to change anything; though as part of updating the course to 3.15 we might want to add an infobox initially. Long term, once we can drop support for pre-3.15 versions, I’d like to switch to the new module name, though, since it’s a bit more intuitive. It might also be worth looking into whether we can replace snakeviz and line_profiler with the profiling.sampling features?
Following PEP 799, there will be a new
profilingmodule in Python 3.15 (coming this autumn), consisting of:profiling.tracing: previously available as thecProfilemoduleprofiling.sampling: a new sampling-based profiler with lots of powerful features (e.g. support for subprocesses, multiple output formats including flame graph and line-level heatmaps)Since the
cProfilemodule will remain available as an alias indefinitely, there’s no urgent need to change anything; though as part of updating the course to 3.15 we might want to add an infobox initially. Long term, once we can drop support for pre-3.15 versions, I’d like to switch to the new module name, though, since it’s a bit more intuitive. It might also be worth looking into whether we can replacesnakevizandline_profilerwith theprofiling.samplingfeatures?