Skip to content

Using this package with sysmon #102

Open

Description

@knyghty

Since Python 3.14 will now allow me to use sys.monitoring for branch coverage, the last obstacle (for me!) remains this package.

I've found a decent workaround: marking every test that renders a template that I want to get coverage on and then running those without the environment variable, separately from the others, and combining the coverage files from the two test runs. Given the timings from my experimentation, this seems well worth the effort.

So this is really just a question: is there anything that can be done in this package or in Coverage.py (or I suppose, in my project) that can work around this in a more general way, without me needing to make this somewhat painstaking change to my codebase?

Activity

  1. nedbat commented on May 27, 2025

    @nedbat
    Member

    We need to support plugins with the sys.monitoring core, as requested here: coveragepy/coveragepy#1790

  2. mschoettle commented on Oct 16, 2025

    @mschoettle

    I just ran into this as well trying to upgrade to Python 3.14 and getting lower coverage (all templates are uncovered). It looks like the default core (trace function implementation) is not ctrace but sysmon on Python 3.14. I could not find this in the release notes and the documentation states that ctrace is the default.

    Docs PR raised here: coveragepy/coveragepy#2067

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions