Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 4e7279a7f122b65559ff182e2ee496eeb9816f33
https://github.com/qemu/qemu/commit/4e7279a7f122b65559ff182e2ee496eeb9816f33
Author: John Snow <[email protected]>
Date: 2025-05-19 (Mon, 19 May 2025)
Changed paths:
M scripts/qapi/backend.py
Log Message:
-----------
qapi: Add some pylint ignores
This restores the linting baseline in QAPI.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
Commit: fffb5512a51299544f9da8e53707c12c9a418431
https://github.com/qemu/qemu/commit/fffb5512a51299544f9da8e53707c12c9a418431
Author: John Snow <[email protected]>
Date: 2025-05-19 (Mon, 19 May 2025)
Changed paths:
M docs/sphinx/qapi_domain.py
M docs/sphinx/qapidoc.py
Log Message:
-----------
docs/qapidoc: linting fixes
This restores the linting baseline in qapidoc. The order of some imports
change slightly here due to configuring isort a little better:
previously, isort was having difficulty understanding that "compat" and
"qapidoc_legacy" were local modules because docs/sphinx "isn't a python
package". Configuring this manually, isort chooses a different import
ordering, which _is_ intentional here.
Also: extra ignores are added for pylint. The most recent versions of
pylint don't require these ignores, but the oldest versions we support
do, so in the extra ignores go.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
Commit: 1c573bdbc3abbb8f98de9d44e45d32b53d33b0cc
https://github.com/qemu/qemu/commit/1c573bdbc3abbb8f98de9d44e45d32b53d33b0cc
Author: John Snow <[email protected]>
Date: 2025-05-19 (Mon, 19 May 2025)
Changed paths:
M python/tests/minreqs.txt
Log Message:
-----------
python: update missing dependencies from minreqs
We pin all dependencies for the "check-minreqs" test because pip lacks a
dependency resolver that installs "the oldest possible package that
meets dependency criteria". So, in order to test our stated minimum
requirements, we pin all of our dependencies (and their dependencies,
transitively) at the oldest possible versions that still work and pass
tests; proving that our minimum requirements are correct.
(It also ensures no new features accidentally sneak in from developers
on newer platforms.)
A few transitive dependencies were omitted from the pinned dependency
file by accident; as a result, pip's dependency solver can pull in newer
dependencies, which we don't want. This patch corrects the previous
oversight and pins the missing dependencies.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
Commit: ff5c55e34c79fcd02e40429a798f707240edd342
https://github.com/qemu/qemu/commit/ff5c55e34c79fcd02e40429a798f707240edd342
Author: John Snow <[email protected]>
Date: 2025-05-19 (Mon, 19 May 2025)
Changed paths:
M python/setup.cfg
M python/tests/minreqs.txt
A python/tests/qapi-flake8.sh
A python/tests/qapi-isort.sh
A python/tests/qapi-mypy.sh
A python/tests/qapi-pylint.sh
M scripts/qapi/pylintrc
Log Message:
-----------
python: add qapi static analysis tests
Update the python tests to also check QAPI and the QAPI Sphinx
extensions. The docs/sphinx/qapidoc_legacy.py file is not included in
these checks, as it is destined for removal soon. mypy is also not
called on the QAPI Sphinx extensions, owing to difficulties supporting
Sphinx 3.x - 8.x while maintaining static type checking support. mypy
*is* called on all of the QAPI tools themselves, though.
flake8, isort and mypy use the tool configuration from the existing
python directory (in setup.cfg). pylint continues to use the special
configuration located in scripts/qapi/ - that configuration is more
permissive. If we wish to unify the two configurations, that's a
separate series and a discussion for a later date.
The list of pylint ignores is also updated, owing again to the wide
window of pylint version support: newer versions require pragmas to
occasionally silence the "too many positional arguments" warning, but
older versions do not have such a warning category and will instead yelp
about an unrecognized option. Silence that warning, too.
As a result of this patch, one would be able to run any of the following
tests locally from the qemu.git/python directory and have it cover the
QAPI tooling as well. All of the following options run the python tests,
static analysis tests, and linter checks; but with different
combinations of dependencies and interpreters.
- "make check-minreqs" Run tests specifically under our oldest supported
Python and our oldest supported dependencies. This is the test that
runs on GitLab as "check-python-minreqs". This helps ensure we do not
regress support on older platforms accidentally.
- "make check-tox" Runs the tests under the newest supported
dependencies, but under each supported version of Python in turn. At
time of writing, this is Python 3.8 to 3.13 inclusive. This test helps
catch bleeding-edge problems before they become problems for developer
workstations. This is the GitLab test "check-python-tox" and is an
optionally run, may-fail test due to the unpredictable nature of new
dependencies being released into the ecosystem that may cause
regressions.
- "make check-dev" Runs the tests under the newest supported
dependencies using whatever version of Python the user happens to have
installed. This is a quick convenience check that does not map to any
particular GitLab test.
(Note! check-dev may be busted on Fedora 41 and bleeding edge versions
of setuptools. That's unrelated to this patch and I'll address it
separately and soon. Thank you for your patience, --mgmt)
Finally, finally, finally: this means that QAPI tooling will be linted
and type-checked from the GitLab pipelines.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
Commit: 61d1b3d443b8d2ca8c349da3868a6ebd50f8c6c5
https://github.com/qemu/qemu/commit/61d1b3d443b8d2ca8c349da3868a6ebd50f8c6c5
Author: Markus Armbruster <[email protected]>
Date: 2025-05-19 (Mon, 19 May 2025)
Changed paths:
M python/setup.cfg
Log Message:
-----------
python: Drop redundant warn_unused_configs = True
strict = True implies warn_unused_configs = True.
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
Commit: 818060c02a53df4b27bc86cbac3a26009996b6a4
https://github.com/qemu/qemu/commit/818060c02a53df4b27bc86cbac3a26009996b6a4
Author: John Snow <[email protected]>
Date: 2025-05-19 (Mon, 19 May 2025)
Changed paths:
R scripts/qapi/.flake8
R scripts/qapi/.isort.cfg
R scripts/qapi/mypy.ini
Log Message:
-----------
qapi: delete un-needed python static analysis configs
Since the previous commit, python/setup.cfg applies to scripts/qapi/ as
well. Configuration files in scripts/qapi/ override python/setup.cfg.
scripts/qapi/.flake8 and scripts/qapi/.isort.cfg actually match
python/setup.cfg exactly, and can go.
The differences between scripts/qapi/mypy.ini and python/setup.cfg are
harmless: namespace_packages being set to True is a requirement for the
PEP420 nested package structure of QEMU but not for scripts/qapi, but
has no effect on type checking the QAPI code. warn_unused_ignores is
used in python/ to be able to target a wide variety of mypy versions;
some of which that have added new ignore categories that are not present
in older versions.
Ultimately, scripts/qapi/mypy.ini can be removed without any real change
in behavior to how mypy enforces type safety there.
The pylint config is being left in place because the settings differ
enough from the python/ directory settings that we need a chit-chat on
how to merge them O:-)
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
Commit: 9a648844a03d65aeeec689082f02eb02910c0c62
https://github.com/qemu/qemu/commit/9a648844a03d65aeeec689082f02eb02910c0c62
Author: Stefan Hajnoczi <[email protected]>
Date: 2025-05-23 (Fri, 23 May 2025)
Changed paths:
M docs/sphinx/qapi_domain.py
M docs/sphinx/qapidoc.py
M python/setup.cfg
M python/tests/minreqs.txt
A python/tests/qapi-flake8.sh
A python/tests/qapi-isort.sh
A python/tests/qapi-mypy.sh
A python/tests/qapi-pylint.sh
R scripts/qapi/.flake8
R scripts/qapi/.isort.cfg
M scripts/qapi/backend.py
R scripts/qapi/mypy.ini
M scripts/qapi/pylintrc
Log Message:
-----------
Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging
Python PR
Add scripts/qapi and docs/sphinx/*qapi* to the Python static analysis checks
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+ber27ys35W+dsvQfe+BBqr8OQ4FAmgrY7AACgkQfe+BBqr8
# OQ5Z+xAAnmJthcTNfdS9MiUqbc6OFy5zYmm0QrZNM5ZROtIciu+bjUh5upalPgCk
# 6bLLkQRjbPUcs4MxXYAuibI47B7kulQGD6AHpza9cybtEbU0Cy+yJPYbIsK3FEqM
# Fo1cInEJ97nV8aCt1GzJ3LkZzgs/u8AmBREvU+VMbrAMN52oYnD3b9vjXBko4/qo
# eVEe6luScCUPtmjiad60YCf0mmySYknDBDFmrPdsmwHLu/yQV2FfDRXVM5OUvNAj
# eXSKhS4TIhaA7jSjiJEX6A5K/qa41Ci2E7mrfG2v01jefCVR4gh30GYbeqav5F4o
# mT4QBbU/utRid5D18w7qnPQ38BcfyLKBHS0K7KzWD410vP+HAgx0wbanUhXmBkhu
# yWCx+EXud+6ih1UFQpld/0ka8nJQ015QVz/rywTQbKAwlXzg6s6lL9LWPMslBsW6
# B4A1a1ac4KUL3+OhnduRvZUyligdPua01NddC2DpDMM2f798xHikbV/fNoAjj85k
# H1NdaM56xevTo+OYVz2wNtwvzEXQQlpIPhU80qYILlboPNv+HxNTRHjvfr0D02vk
# XUPLVOLEQ3fJImSVgLH45MJut7tp+xgiTVi8gIt69R7vwNSXll2EUB9jZ9rzAmh1
# FluVdR9u8+qIxfCBhwgJgiqtMyzsKSapZhGP1rlZ/SbcGifX2+U=
# =Z6Cf
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 19 May 2025 13:00:32 EDT
# gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <[email protected]>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB
# Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E
* tag 'python-pull-request' of https://gitlab.com/jsnow/qemu:
qapi: delete un-needed python static analysis configs
python: Drop redundant warn_unused_configs = True
python: add qapi static analysis tests
python: update missing dependencies from minreqs
docs/qapidoc: linting fixes
qapi: Add some pylint ignores
Signed-off-by: Stefan Hajnoczi <[email protected]>
Compare: https://github.com/qemu/qemu/compare/668df86ee807...9a648844a03d
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications