Package: release.debian.org
Severity: normal
X-Debbugs-Cc: python-covdefau...@packages.debian.org
Control: affects -1 + src:python-covdefaults
User: release.debian....@packages.debian.org
Usertags: unblock

[ Reason ]
python-covdefaults's tests were broken by python-coverage >= 7.7.0 in 
unstable; see https://bugs.debian.org/1107410.

[ Impact ]
Nothing at run-time; this is a test-only change.  However, given the 
simplicity of the fix, it seemed easier to file an unblock request than 
to figure out how to fiddle with the bug metadata so that it doesn't 
look as though python-covdefaults has an RC bug in trixie.

[ Tests ]
The affected code is in tests that are run during build and via 
autopkgtest.

[ Risks ]
This is a key package.  I can't see how there would be any run-time 
risk, though.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock python-covdefaults/2.3.0-3

Thanks,

-- 
Colin Watson (he/him)                              [cjwat...@debian.org]
diff -Nru python-covdefaults-2.3.0/debian/changelog 
python-covdefaults-2.3.0/debian/changelog
--- python-covdefaults-2.3.0/debian/changelog   2023-08-08 10:47:55.000000000 
+0100
+++ python-covdefaults-2.3.0/debian/changelog   2025-06-10 18:14:47.000000000 
+0100
@@ -1,3 +1,10 @@
+python-covdefaults (2.3.0-3) unstable; urgency=medium
+
+  * Team upload.
+  * Support Coverage 7.7.0 and above (closes: #1107410).
+
+ -- Colin Watson <cjwat...@debian.org>  Tue, 10 Jun 2025 18:14:47 +0100
+
 python-covdefaults (2.3.0-2) unstable; urgency=medium
 
   [ Andrius Merkys ]
diff -Nru python-covdefaults-2.3.0/debian/patches/coverage-7.7.0.patch 
python-covdefaults-2.3.0/debian/patches/coverage-7.7.0.patch
--- python-covdefaults-2.3.0/debian/patches/coverage-7.7.0.patch        
1970-01-01 01:00:00.000000000 +0100
+++ python-covdefaults-2.3.0/debian/patches/coverage-7.7.0.patch        
2025-06-10 18:14:47.000000000 +0100
@@ -0,0 +1,41 @@
+From: Steve Kowalik <ste...@wedontsleep.org>
+Date: Mon, 31 Mar 2025 12:40:43 +1100
+Subject: Support Coverage 7.7.0 and above
+
+Coverage 7.7.0 refactored the way the Plugins class is used, and as a
+consequence, the load_plugins method was renamed, and is no longer a
+class method. Check if the new method exists, and fall back to the older
+method otherwise.
+
+[cjwatson: A different patch that drops compatibility with older
+versions was committed upstream; see
+https://github.com/asottile/covdefaults/pull/164.  However, this one is
+more convenient for use in Debian until python-coverage >= 7.7.0
+migrates to testing.]
+
+Origin: other, 
https://github.com/asottile/covdefaults/commit/5f8217506f8425d793b04d6379971c7c6245d9e5
+Bug-Debian: https://bugs.debian.org/1107410
+Last-Update: 2025-06-10
+---
+ tests/covdefaults_test.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/tests/covdefaults_test.py b/tests/covdefaults_test.py
+index 2bf41c2..9f3f129 100644
+--- a/tests/covdefaults_test.py
++++ b/tests/covdefaults_test.py
+@@ -228,7 +228,13 @@ def test_configure_keeps_existing_fail_under():
+ 
+ def test_coverage_init():
+     cfg = CoverageConfig()
+-    plugin_manager = Plugins.load_plugins(['covdefaults'], cfg)
++    # Coverage 7.7.0 and above
++    if hasattr(Plugins, 'load_from_config'):
++        plugin_manager = Plugins()
++        plugin_manager.load_from_config(['covdefaults'], cfg)
++    # Coverage 7.6.12 and below
++    else:  # pragma: no cover
++        plugin_manager = Plugins.load_plugins(['covdefaults'], cfg)
+     assert plugin_manager.get('covdefaults.CovDefaults')
+ 
+ 
diff -Nru python-covdefaults-2.3.0/debian/patches/series 
python-covdefaults-2.3.0/debian/patches/series
--- python-covdefaults-2.3.0/debian/patches/series      1970-01-01 
01:00:00.000000000 +0100
+++ python-covdefaults-2.3.0/debian/patches/series      2025-06-10 
18:14:47.000000000 +0100
@@ -0,0 +1 @@
+coverage-7.7.0.patch

Reply via email to