- Package:
- src:python-qemu-qmp
- Source:
- src:python-qemu-qmp
- Submitter:
- Boyuan Yang
- Date:
- 2026-09-25 14:53:02 UTC
- Severity:
- normal
- Tags:
Dear Debian python-qemu-qmp maintainer,
Your package, python-qemu-qmp, fails to build from source with urwid/4.1.3-1
in Debian Unstable. Its autopkgtest would also fail.
There is no functionality regression; the issue comes from the linter tests:
|
FAILED tests/linters.py::TestLinters::test_mypy
FAILED tests/linters.py::TestLinters::test_pylint
|
There are independent causes, both in qemu/qmp/qmp_tui.py (which the
Debian package does not even ship as a command, since debian/rules
removes usr/bin/qmp-tui):
1. urwid 4.1 started shipping a py.typed marker. mypy therefore
stops treating urwid as an untyped library, the existing
"ignore_missing_imports = True" for urwid has no effect any more,
and qmp_tui.py fails with nine errors such as:
qmp_tui.py:538: error: Argument 1 of "mouse_event" is incompatible
with supertype "urwid.widget.widget.Widget" [override]
qmp_tui.py:498: error: Missing type arguments for generic type
"Filler" [type-arg]
qmp_tui.py:400: error: Argument "unhandled_input" to "MainLoop" has
incompatible type "Callable[[str], None]" [arg-type]
2. urwid 4 deepened its widget class hierarchy, so pylint now reports
R0901 too-many-ancestors (8-10 of 7) for the four widget subclasses
in qmp_tui.py.|
The attached patch keeps both linters passing by making mypy treat urwid as untyped again ("follow_imports = skip" for
urwid and urwid.*) and by disabling too-many-ancestors, since the ancestor count comes from urwid rather than from this
code base. With the patch applied, a build in a clean sid chroot (python3-urwid 4.1.3-1, python3-mypy 2.2.0-5, pylint
4.0.8-1) succeeds and the autopkgtest passes with 31 tests. The change is backwards compatible with urwid 3.x and could
be forwarded upstream as is. If you do not have time for this, I am happy to do an NMU with the attached patch with
DELAYED/5. Let me know if you find that necessary. Thanks, Boyuan Yang|
Dear maintainer, I've prepared an NMU for python-qemu-qmp (versioned as 0.0.6-1.1) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. Regards. diffstat for python-qemu-qmp-0.0.6 python-qemu-qmp-0.0.6 changelog | 10 ++ patches/0001-Keep-linter-tests-passing-with-urwid-4.x.patch | 43 ++++++++++++ patches/series | 1 3 files changed, 54 insertions(+) diff -Nru python-qemu-qmp-0.0.6/debian/changelog python-qemu-qmp-0.0.6/debian/changelog --- python-qemu-qmp-0.0.6/debian/changelog 2026-04-03 13:05:58.000000000 -0400 +++ python-qemu-qmp-0.0.6/debian/changelog 2026-09-17 15:27:43.000000000 -0400 @@ -1,3 +1,13 @@ +python-qemu-qmp (0.0.6-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches/0001-Keep-linter-tests-passing-with-urwid-4.x.patch: + Add patch to fix FTBFS and autopkgtest failure with urwid 4.x: make + mypy keep treating urwid as untyped and disable the pylint + too-many-ancestors check. (Closes: #1148059) + + -- Boyuan Yang <byang@debian.org> Thu, 17 Sep 2026 15:27:43 -0400 + python-qemu-qmp (0.0.6-1) unstable; urgency=medium * new upstream release 0.0.6 diff -Nru python-qemu-qmp-0.0.6/debian/patches/0001-Keep-linter-tests-passing-with-urwid-4.x.patch python-qemu-qmp-0.0.6/debian/patches/0001-Keep-linter-tests-passing-with-urwid-4.x.patch --- python-qemu-qmp-0.0.6/debian/patches/0001-Keep-linter-tests-passing-with-urwid-4.x.patch 1969-12-31 19:00:00.000000000 -0500 +++ python-qemu-qmp-0.0.6/debian/patches/0001-Keep-linter-tests-passing-with-urwid-4.x.patch 2026-09-17 15:27:38.000000000 -0400 @@ -0,0 +1,43 @@ +From: Boyuan Yang <byang@debian.org> +Date: Wed, 16 Sep 2026 10:20:50 -0400 +Subject: Keep linter tests passing with urwid 4.x + +urwid >= 4.1 ships a py.typed marker, so mypy no longer treats it as an +untyped library and "ignore_missing_imports" has no effect any more; +qmp_tui.py, which predates those annotations, then fails test_mypy with +[override], [type-arg] and [arg-type] errors. Make mypy keep treating +urwid as untyped by not following its imports. + +urwid 4 also deepened its widget class hierarchy, which makes pylint +report R0901 too-many-ancestors for the widget subclasses in qmp_tui.py. +The ancestor count comes from urwid rather than from this code base, so +disable that check. + +Both changes are backwards compatible with urwid 3.x. + +Bug-Debian: https://bugs.debian.org/1148059 +Forwarded: no +--- +--- a/setup.cfg ++++ b/setup.cfg +@@ -96,8 +96,11 @@ + + # The following missing import directives are because these libraries do not + # provide type stubs. Allow them on an as-needed basis for mypy. +-[mypy-urwid] ++# urwid >= 4.1 ships py.typed, but qmp_tui.py predates those annotations; ++# keep treating it as untyped. ++[mypy-urwid,urwid.*] + ignore_missing_imports = True ++follow_imports = skip + + [mypy-urwid_readline] + ignore_missing_imports = True +@@ -120,6 +123,7 @@ + too-many-arguments, + too-many-function-args, # mypy handles this with less false positives. + too-many-instance-attributes, ++ too-many-ancestors, # urwid >= 4 widget hierarchy is deeper. + no-member, # mypy also handles this better. + unknown-option-value, # pre and post "too-many-positional-arguments" + diff -Nru python-qemu-qmp-0.0.6/debian/patches/series python-qemu-qmp-0.0.6/debian/patches/series --- python-qemu-qmp-0.0.6/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ python-qemu-qmp-0.0.6/debian/patches/series 2026-09-17 15:27:37.000000000 -0400 @@ -0,0 +1 @@ +0001-Keep-linter-tests-passing-with-urwid-4.x.patch
We believe that the bug you reported is fixed in the latest version of
python-qemu-qmp, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1148059@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Boyuan Yang <byang@debian.org> (supplier of updated python-qemu-qmp package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 17 Sep 2026 15:27:43 -0400
Source: python-qemu-qmp
Architecture: source
Version: 0.0.6-1.1
Distribution: unstable
Urgency: medium
Maintainer: Debian QEMU Team <team+qemu@tracker.debian.org>
Changed-By: Boyuan Yang <byang@debian.org>
Closes: 1148059
Changes:
python-qemu-qmp (0.0.6-1.1) unstable; urgency=medium
.
* Non-maintainer upload.
* debian/patches/0001-Keep-linter-tests-passing-with-urwid-4.x.patch:
Add patch to fix FTBFS and autopkgtest failure with urwid 4.x: make
mypy keep treating urwid as untyped and disable the pylint
too-many-ancestors check. (Closes: #1148059)
Checksums-Sha1:
374feaed6a9689625e90006f54014c5a045e6ad9 2431 python-qemu-qmp_0.0.6-1.1.dsc
3e29c0eab12c88ba246dc7d0f06aa11a0940680e 72032 python-qemu-qmp_0.0.6.orig.tar.xz
d455657bfe539d5e6495f96b2d3a8f990bff6243 2948 python-qemu-qmp_0.0.6-1.1.debian.tar.xz
b67da9b7dba34c577c8c1cd05fab53d86265b9e1 8161 python-qemu-qmp_0.0.6-1.1_amd64.buildinfo
Checksums-Sha256:
be8740099fa1cd05c4199e318ca594bf8ae76729005068debfc3469c68965ff7 2431 python-qemu-qmp_0.0.6-1.1.dsc
76def6f9d022255ff95eb56d9ea5e1bc060c151cd6c55917bc427f224e06d1f6 72032 python-qemu-qmp_0.0.6.orig.tar.xz
627d9ef5c83bbfc366c3da6b6ddf32bacfc6b7b9e0357ee866f56e1848d7e348 2948 python-qemu-qmp_0.0.6-1.1.debian.tar.xz
f767a84d275ecbd7f38a3b0b95144348e9754913a4b859207ebc8b197d0c473d 8161 python-qemu-qmp_0.0.6-1.1_amd64.buildinfo
Files:
6159b6de8b6278bea4fddd8ebf157121 2431 python optional python-qemu-qmp_0.0.6-1.1.dsc
feb1cb9cfac2071ca625e8daeaf84e21 72032 python optional python-qemu-qmp_0.0.6.orig.tar.xz
a2c4d89cbcb9238ce744bc1532a516a9 2948 python optional python-qemu-qmp_0.0.6-1.1.debian.tar.xz
c45e165e2aa9bff229728157a0b8b220 8161 python optional python-qemu-qmp_0.0.6-1.1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEfncpR22H1vEdkazLwpPntGGCWs4FAmqsQPcACgkQwpPntGGC
Ws6eeA/+Ik/KG4Uvw+R1ZOYZS7YWVx4OLRee1LGaJXrHGJzLUn/+t8Z9hGrJqZZ2
BMKWt++qZCSPzfYHkM4sinP2DQsUF40uBYKgme0XbuApS0BVDsFHBUmNhCRF92Cx
9mFfozFdObKGW617NJePhefMclNDxWNDJQmaZM2+QxPSmm5bXv/T9lJNGs58f7Lh
YDKWzQU1frzw+bV6pFk3BzoV7LZ3S6H5sssq9Qzn4UUqt92S4B9oK83/4VP4viQP
teqDzawBeEazvt0y9dmfwzpoqnqgkIkz5eDD1SLhAbjaHaF24f+rSt19E0JbiSKu
DTjIPG36W+FpnndYXCWorsYi4zH8tiN9WHaaATNlNaaSWo5jcrWGdpu8SHajfUMa
ZVr1p1M2UOBi3AVk6pst23z333f0kDiBAnCzg6sLkVuos3PbxrH55Y1+FPIx8qaV
4L1yF191zEMlILilYhmDv/OLYDOWjP756GigAzOKuRyBn/WgCQa0tOylQcyrdFLQ
XUzwB4VaxiKuwkB/yU+gPG1xxv7QI7k7h7/wypUGsOuAJcwJwQvZ8L9L0kBRsu37
3cQVgnXO/S0wYqepOmaGoBBFNstj1iu9TUTUv2HBZUp/7kYdKBA842i+uwS612TT
joZcgoGfFXiF1C1jYTBITNZk8CVPQ83fjgMEFMwp82G9jIx04c8=
=oSBC
-----END PGP SIGNATURE-----