From 42054cce1c3ac6265ce6f6a593c5792fff9bba0d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 9 Nov 2025 19:14:50 -0500 Subject: [PATCH 01/62] build: bump version to 7.11.4 --- CHANGES.rst | 6 ++++++ coverage/version.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index d4ed013f7..659cb8b21 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,12 @@ upgrading your version of coverage.py. .. Version 9.8.1 — 2027-07-27 .. -------------------------- +Unreleased +---------- + +Nothing yet. + + .. start-releases .. _changes_7-11-3: diff --git a/coverage/version.py b/coverage/version.py index 0205a3673..ec5ee91e4 100644 --- a/coverage/version.py +++ b/coverage/version.py @@ -8,8 +8,8 @@ # version_info: same semantics as sys.version_info. # _dev: the .devN suffix if any. -version_info = (7, 11, 3, "final", 0) -_dev = 0 +version_info = (7, 11, 4, "alpha", 0) +_dev = 1 def _make_version( From 173cba926e5c6b9cf71c9035ffea01e7d1380f60 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 11 Nov 2025 07:09:23 -0500 Subject: [PATCH 02/62] build: combine two steps in howto.txt --- howto.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/howto.txt b/howto.txt index 91be8f4d2..85f095b9c 100644 --- a/howto.txt +++ b/howto.txt @@ -70,8 +70,7 @@ - keep just the latest version of each x.y release, make the rest active but hidden. - pre-releases should be hidden - IF NOT PRE-RELEASE: - $ opvars - $ make update_rtd + $ opvars; make update_rtd $ deopvars - Once CI passes, merge the bump-version branch to main and push it $ gshipit From 836b8a641c4c216e2291108fb353efb4db0678e6 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 11 Nov 2025 07:33:28 -0500 Subject: [PATCH 03/62] style(html): thin spaces around slashes --- CHANGES.rst | 3 +- coverage/html.py | 6 + coverage/htmlfiles/index.html | 2 +- coverage/htmlfiles/pyfile.html | 2 +- doc/sample_html/class_index.html | 102 ++-- doc/sample_html/function_index.html | 502 +++++++++--------- doc/sample_html/index.html | 28 +- doc/sample_html/status.json | 2 +- .../z_7b071bdc2a35fa80___init___py.html | 10 +- .../z_7b071bdc2a35fa80___main___py.html | 10 +- .../z_7b071bdc2a35fa80_cogapp_py.html | 10 +- .../z_7b071bdc2a35fa80_hashhandler_py.html | 10 +- .../z_7b071bdc2a35fa80_makefiles_py.html | 10 +- .../z_7b071bdc2a35fa80_test_cogapp_py.html | 10 +- .../z_7b071bdc2a35fa80_test_makefiles_py.html | 10 +- ...z_7b071bdc2a35fa80_test_whiteutils_py.html | 10 +- .../z_7b071bdc2a35fa80_utils_py.html | 10 +- .../z_7b071bdc2a35fa80_whiteutils_py.html | 10 +- tests/gold/html/other/blah_blah_other_py.html | 16 +- tests/gold/html/other/class_index.html | 16 +- tests/gold/html/other/function_index.html | 16 +- tests/gold/html/other/index.html | 16 +- tests/test_html.py | 8 +- tests/test_report_common.py | 10 +- 24 files changed, 420 insertions(+), 409 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 659cb8b21..693b5ec3b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,7 +23,8 @@ upgrading your version of coverage.py. Unreleased ---------- -Nothing yet. +- A small tweak to the HTML report: file paths now use thin spaces around + slashes to make them easier to read. .. start-releases diff --git a/coverage/html.py b/coverage/html.py index 1fff59569..a08373210 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -314,6 +314,7 @@ def __init__(self, cov: Coverage) -> None: "escape": escape, "pair": pair, "len": len, + "pretty_file": pretty_file, # Constants for this report. "__url__": __url__, "__version__": coverage.__version__, @@ -854,3 +855,8 @@ def escape(t: str) -> str: def pair(ratio: tuple[int, int]) -> str: """Format a pair of numbers so JavaScript can read them in an attribute.""" return "{} {}".format(*ratio) + + +def pretty_file(filename: str) -> str: + """Return a prettier version of `filename` for display.""" + return re.sub(r"[/\\]", "\N{THIN SPACE}\\g<0>\N{THIN SPACE}", filename) diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html index bb84b4403..b972c850c 100644 --- a/coverage/htmlfiles/index.html +++ b/coverage/htmlfiles/index.html @@ -99,7 +99,7 @@

{% for region in regions %} - {{region.file}} + {{region.file|escape|pretty_file}} {% if region_noun %} {{region.description}} {% endif %} diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index f4cf66a93..ce9f26d2c 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -25,7 +25,7 @@

- Coverage for {{relative_filename|escape}}: + Coverage for {{relative_filename|escape|pretty_file}}: {{nums.pc_covered_str}}%

diff --git a/doc/sample_html/class_index.html b/doc/sample_html/class_index.html index a8ba27051..e6b87a8b4 100644 --- a/doc/sample_html/class_index.html +++ b/doc/sample_html/class_index.html @@ -56,8 +56,8 @@

Classes

- coverage.py v7.11.3, - created at 2025-11-09 18:19 -0500 + coverage.py v7.11.4a0.dev1, + created at 2025-11-11 07:02 -0500

@@ -77,7 +77,7 @@

- cogapp/__init__.py + cogapp / __init__.py (no class) 1 0 @@ -87,7 +87,7 @@

100.00% - cogapp/__main__.py + cogapp / __main__.py (no class) 3 3 @@ -97,7 +97,7 @@

0.00% - cogapp/cogapp.py + cogapp / cogapp.py CogError 3 0 @@ -107,7 +107,7 @@

100.00% - cogapp/cogapp.py + cogapp / cogapp.py CogUsageError 0 0 @@ -117,7 +117,7 @@

100.00% - cogapp/cogapp.py + cogapp / cogapp.py CogInternalError 0 0 @@ -127,7 +127,7 @@

100.00% - cogapp/cogapp.py + cogapp / cogapp.py CogGeneratedError 0 0 @@ -137,7 +137,7 @@

100.00% - cogapp/cogapp.py + cogapp / cogapp.py CogUserException 0 0 @@ -147,7 +147,7 @@

100.00% - cogapp/cogapp.py + cogapp / cogapp.py CogCheckFailed 0 0 @@ -157,7 +157,7 @@

100.00% - cogapp/cogapp.py + cogapp / cogapp.py CogGenerator 58 6 @@ -167,7 +167,7 @@

88.46% - cogapp/cogapp.py + cogapp / cogapp.py CogOptions 88 64 @@ -177,7 +177,7 @@

17.39% - cogapp/cogapp.py + cogapp / cogapp.py Cog 259 162 @@ -187,7 +187,7 @@

35.20% - cogapp/cogapp.py + cogapp / cogapp.py (no class) 88 9 @@ -197,7 +197,7 @@

86.46% - cogapp/hashhandler.py + cogapp / hashhandler.py HashHandler 51 35 @@ -207,7 +207,7 @@

26.67% - cogapp/hashhandler.py + cogapp / hashhandler.py (no class) 12 0 @@ -217,7 +217,7 @@

100.00% - cogapp/makefiles.py + cogapp / makefiles.py (no class) 22 18 @@ -227,7 +227,7 @@

11.11% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogTestsInMemory 73 0 @@ -237,7 +237,7 @@

100.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogOptionsTests 31 31 @@ -247,7 +247,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py FileStructureTests 29 29 @@ -257,7 +257,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogErrorTests 11 11 @@ -267,7 +267,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogGeneratorGetCodeTests 37 37 @@ -277,7 +277,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py TestCaseWithTempDir 19 19 @@ -287,7 +287,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py ArgumentHandlingTests 47 47 @@ -297,7 +297,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py TestMain 27 27 @@ -307,7 +307,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py TestFileHandling 79 79 @@ -317,7 +317,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogTestLineEndings 12 12 @@ -327,7 +327,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogTestCharacterEncoding 12 12 @@ -337,7 +337,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py TestCaseWithImports 6 6 @@ -347,7 +347,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogIncludeTests 46 46 @@ -357,7 +357,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CogTestsInFiles 122 122 @@ -367,7 +367,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CheckTests 61 61 @@ -377,7 +377,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py WritabilityTests 19 19 @@ -387,7 +387,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py ChecksumTests 34 34 @@ -397,7 +397,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py CustomMarkerTests 12 12 @@ -407,7 +407,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py BlakeTests 15 15 @@ -417,7 +417,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py ErrorCallTests 12 12 @@ -427,7 +427,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py HashHandlerTests 10 10 @@ -437,7 +437,7 @@

0.00% - cogapp/test_cogapp.py + cogapp / test_cogapp.py (no class) 197 2 @@ -447,7 +447,7 @@

98.49% - cogapp/test_makefiles.py + cogapp / test_makefiles.py SimpleTests 51 51 @@ -457,7 +457,7 @@

0.00% - cogapp/test_makefiles.py + cogapp / test_makefiles.py (no class) 17 0 @@ -467,7 +467,7 @@

100.00% - cogapp/test_whiteutils.py + cogapp / test_whiteutils.py WhitePrefixTests 17 17 @@ -477,7 +477,7 @@

0.00% - cogapp/test_whiteutils.py + cogapp / test_whiteutils.py ReindentBlockTests 21 21 @@ -487,7 +487,7 @@

0.00% - cogapp/test_whiteutils.py + cogapp / test_whiteutils.py CommonPrefixTests 12 12 @@ -497,7 +497,7 @@

0.00% - cogapp/test_whiteutils.py + cogapp / test_whiteutils.py (no class) 18 0 @@ -507,7 +507,7 @@

100.00% - cogapp/utils.py + cogapp / utils.py Redirectable 8 3 @@ -517,7 +517,7 @@

58.33% - cogapp/utils.py + cogapp / utils.py NumberedFileReader 7 0 @@ -527,7 +527,7 @@

100.00% - cogapp/utils.py + cogapp / utils.py (no class) 22 5 @@ -537,7 +537,7 @@

77.27% - cogapp/whiteutils.py + cogapp / whiteutils.py (no class) 44 5 @@ -567,8 +567,8 @@

diff --git a/doc/sample_html/z_7b071bdc2a35fa80_hashhandler_py.html b/doc/sample_html/z_7b071bdc2a35fa80_hashhandler_py.html index 74142d3ad..cb63ea90c 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80_hashhandler_py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80_hashhandler_py.html @@ -11,7 +11,7 @@

- Coverage for cogapp/hashhandler.py: + Coverage for cogapp / hashhandler.py: 36.78%

diff --git a/doc/sample_html/z_7b071bdc2a35fa80_makefiles_py.html b/doc/sample_html/z_7b071bdc2a35fa80_makefiles_py.html index 53c263a06..8e9af54a5 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80_makefiles_py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80_makefiles_py.html @@ -11,7 +11,7 @@

- Coverage for cogapp/makefiles.py: + Coverage for cogapp / makefiles.py: 11.11%

diff --git a/doc/sample_html/z_7b071bdc2a35fa80_test_cogapp_py.html b/doc/sample_html/z_7b071bdc2a35fa80_test_cogapp_py.html index e6374dbe9..42a9845f6 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80_test_cogapp_py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80_test_cogapp_py.html @@ -11,7 +11,7 @@

- Coverage for cogapp/test_cogapp.py: + Coverage for cogapp / test_cogapp.py: 29.11%

diff --git a/doc/sample_html/z_7b071bdc2a35fa80_test_makefiles_py.html b/doc/sample_html/z_7b071bdc2a35fa80_test_makefiles_py.html index f84b31fc0..a34272318 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80_test_makefiles_py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80_test_makefiles_py.html @@ -11,7 +11,7 @@

- Coverage for cogapp/test_makefiles.py: + Coverage for cogapp / test_makefiles.py: 22.97%

diff --git a/doc/sample_html/z_7b071bdc2a35fa80_test_whiteutils_py.html b/doc/sample_html/z_7b071bdc2a35fa80_test_whiteutils_py.html index 9889cbfb1..a3d525eba 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80_test_whiteutils_py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80_test_whiteutils_py.html @@ -11,7 +11,7 @@

- Coverage for cogapp/test_whiteutils.py: + Coverage for cogapp / test_whiteutils.py: 26.47%

diff --git a/doc/sample_html/z_7b071bdc2a35fa80_utils_py.html b/doc/sample_html/z_7b071bdc2a35fa80_utils_py.html index 55e5974fa..bdb15ce0f 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80_utils_py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80_utils_py.html @@ -11,7 +11,7 @@

- Coverage for cogapp/utils.py: + Coverage for cogapp / utils.py: 76.74%

diff --git a/doc/sample_html/z_7b071bdc2a35fa80_whiteutils_py.html b/doc/sample_html/z_7b071bdc2a35fa80_whiteutils_py.html index 17e3732cf..0d2405447 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80_whiteutils_py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80_whiteutils_py.html @@ -11,7 +11,7 @@

- Coverage for cogapp/whiteutils.py: + Coverage for cogapp / whiteutils.py: 88.16%

diff --git a/tests/gold/html/other/blah_blah_other_py.html b/tests/gold/html/other/blah_blah_other_py.html index 9483787d6..5e6108c3c 100644 --- a/tests/gold/html/other/blah_blah_other_py.html +++ b/tests/gold/html/other/blah_blah_other_py.html @@ -2,16 +2,16 @@ - Coverage for /private/var/folders/6j/khn0mcrj35d1k3yylpl8zl080000gn/T/pytest-of-ned/pytest-65/popen-gw5/t76/othersrc/other.py: 100% + Coverage for /private/var/folders/6j/khn0mcrj35d1k3yylpl8zl080000gn/T/pytest-of-ned/pytest-9/popen-gw4/t0/othersrc/other.py: 100% - - + +

- Coverage for /private/var/folders/6j/khn0mcrj35d1k3yylpl8zl080000gn/T/pytest-of-ned/pytest-65/popen-gw5/t76/othersrc/other.py: + Coverage for  / private / var / folders / 6j / khn0mcrj35d1k3yylpl8zl080000gn / T / pytest-of-ned / pytest-9 / popen-gw4 / t0 / othersrc / other.py: 100%

diff --git a/tests/gold/html/other/class_index.html b/tests/gold/html/other/class_index.html index abbc50714..0f15e9272 100644 --- a/tests/gold/html/other/class_index.html +++ b/tests/gold/html/other/class_index.html @@ -4,8 +4,8 @@ Coverage report - - + +
@@ -54,8 +54,8 @@

Classes

- coverage.py v7.6.0a0.dev1, - created at 2024-07-10 12:20 -0400 + coverage.py v7.11.4a0.dev1, + created at 2025-11-11 07:25 -0500

@@ -73,8 +73,8 @@

- /private/var/folders/6j/khn0mcrj35d1k3yylpl8zl080000gn/T/pytest-of-ned/pytest-65/popen-gw5/t76/othersrc/other.py - (no class) +  / private / var / folders / 6j / khn0mcrj35d1k3yylpl8zl080000gn / T / pytest-of-ned / pytest-9 / popen-gw4 / t0 / othersrc / other.py + (no class) 1 0 0 @@ -107,8 +107,8 @@

- coverage.py v7.6.0a0.dev1, - created at 2024-07-10 12:20 -0400 + coverage.py v7.11.4a0.dev1, + created at 2025-11-11 07:25 -0500

@@ -822,8 +822,8 @@

- coverage.py v7.12.0, - created at 2025-11-18 06:09 -0500 + coverage.py v7.13.0, + created at 2025-12-08 07:30 -0500

@@ -3822,8 +3822,8 @@

- coverage.py v7.12.0, - created at 2025-11-18 06:09 -0500 + coverage.py v7.13.0, + created at 2025-12-08 07:30 -0500

@@ -253,8 +253,8 @@

- coverage.py v7.12.0, - created at 2025-11-18 06:09 -0500 + coverage.py v7.13.0, + created at 2025-12-08 07:30 -0500

diff --git a/doc/sample_html/z_7b071bdc2a35fa80___main___py.html b/doc/sample_html/z_7b071bdc2a35fa80___main___py.html index 97e2325bb..b615a64c2 100644 --- a/doc/sample_html/z_7b071bdc2a35fa80___main___py.html +++ b/doc/sample_html/z_7b071bdc2a35fa80___main___py.html @@ -4,7 +4,7 @@ Coverage for cogapp/__main__.py: 0.00% - + @@ -66,8 +66,8 @@

^ index     » next       - coverage.py v7.12.0, - created at 2025-11-18 06:09 -0500 + coverage.py v7.13.0, + created at 2025-12-08 07:30 -0500