python-libzim
python-libzim copied to clipboard
Use `sys.monitoring` once coverage.py supports it
In https://github.com/openzim/python-libzim/pull/237/commits/036a5ec8df389d021979a253f299773975233a23, we've made configuration changes to ensure coverage still works with Cython 3.1
The issue is that:
coveragehas switched tosys.monitoringcore to collect profile / linetracing in 7.9.1 on Python 3.14+: https://coverage.readthedocs.io/en/latest/changes.html#version-7-9-1-2025-06-13- Cython also uses
sys.monitoringprofile / linetracing by default since 3.1 (see https://github.com/cython/cython/pull/6144)
The commit referenced above hence asked:
- coverage to use the
ctracecore - Cython to not use sys.monitoring for profile / linetracing
This needs to be rolled-back (to use sys.monitoring which is expected to be way more performant) once coverage supports plugins with sys.monitoring (probably https://github.com/nedbat/coveragepy/issues/1790 is the issue to follow).