carpentries-incubator / carpentries-incubator/pando-python

New `profiling` module in Python 3.15

Open
#32 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
12
Avg merge
4h 35m
Merged PRs (30d)
2

Description

Following [PEP 799](https://peps.python.org/pep-0799/), there will be a new `profiling` module in Python 3.15 (coming [this autumn](https://peps.python.org/pep-0790/)), consisting of:
* [`profiling.tracing`](https://docs.python.org/3.15/library/profiling.tracing.html): previously available as the `cProfile` module
* [`profiling.sampling`](https://docs.python.org/3.15/library/profiling.sampling.html): 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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.