Skip to content

Commit 3879b97

Browse files
committed
docs: mention sys.monitoring support
1 parent 9a84eeb commit 3879b97

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

CHANGES.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ development at the same time, such as 4.5.x and 5.0.
2020
Unreleased
2121
----------
2222

23-
Nothing yet.
23+
- In Python 3.12 and above, you can try an experimental core based on the new
24+
:mod:`sys.monitoring <python:sys.monitoring>` module by defining a
25+
``COVERAGE_CORE=sysmon`` environment variable. This should be faster, though
26+
plugins and dynamic contexts are not yet supported with it. I am very
27+
interested to hear how it works (or doesn't!) for you.
2428

2529

2630
.. scriv-start-here

coverage/cmdline.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ class Opts:
217217
)
218218
timid = optparse.make_option(
219219
"", "--timid", action="store_true",
220-
help=(
221-
"Use a simpler but slower trace method. Try this if you get " +
222-
"seemingly impossible results!"
223-
),
220+
help="Use the slower Python trace function core.",
224221
)
225222
title = optparse.make_option(
226223
"", "--title", action="store", metavar="TITLE",

doc/cmd.rst

+7-3
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,14 @@ There are many options:
136136
--source=SRC1,SRC2,...
137137
A list of directories or importable names of code to
138138
measure.
139-
--timid Use a simpler but slower trace method. Try this if you
140-
get seemingly impossible results!
139+
--timid Use the slower Python trace function core.
141140
--debug=OPTS Debug options, separated by commas. [env:
142141
COVERAGE_DEBUG]
143142
-h, --help Get help on this command.
144143
--rcfile=RCFILE Specify configuration file. By default '.coveragerc',
145144
'setup.cfg', 'tox.ini', and 'pyproject.toml' are
146145
tried. [env: COVERAGE_RCFILE]
147-
.. [[[end]]] (checksum: 05d15818e42e6f989c42894fb2b3c753)
146+
.. [[[end]]] (checksum: b1a0fffe2768fc142f1d97ae556b621d)
148147
149148
If you want :ref:`branch coverage <branch>` measurement, use the ``--branch``
150149
flag. Otherwise only statement coverage is measured.
@@ -203,6 +202,11 @@ If your coverage results seem to be overlooking code that you know has been
203202
executed, try running coverage.py again with the ``--timid`` flag. This uses a
204203
simpler but slower trace method, and might be needed in rare cases.
205204

205+
In Python 3.12 and above, you can try an experimental core based on the new
206+
:mod:`sys.monitoring <python:sys.monitoring>` module by defining a
207+
``COVERAGE_CORE=sysmon`` environment variable. This should be faster, though
208+
plugins and dynamic contexts are not yet supported with it.
209+
206210
Coverage.py sets an environment variable, ``COVERAGE_RUN`` to indicate that
207211
your code is running under coverage measurement. The value is not relevant,
208212
and may change in the future.

doc/config.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ ambiguities between packages and directories.
477477
[run] timid
478478
...........
479479

480-
(boolean, default False) Use a simpler but slower trace method. This uses
481-
PyTracer instead of CTracer, and is only needed in very unusual circumstances.
482-
Try this if you get seemingly impossible results.
480+
(boolean, default False) Use a simpler but slower trace method. This uses the
481+
PyTracer trace function core instead of CTracer, and is only needed in very
482+
unusual circumstances.
483483

484484

485485
.. _config_paths:

doc/python-coverage.1.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,7 @@ COMMAND REFERENCE
384384
A list of packages or directories of code to be measured.
385385

386386
\--timid
387-
Use a simpler but slower trace method. Try this if you get
388-
seemingly impossible results!
387+
Use the slower Python trace function core.
389388

390389
**xml** [ `options` ... ] [ `MODULES` ... ]
391390

0 commit comments

Comments
 (0)