]> git.ipfire.org Git - thirdparty/qemu.git/commit
scripts/vmstate-static-checker: Fix deprecation warnings with latest argparse
authorThomas Huth <thuth@redhat.com>
Thu, 30 Oct 2025 09:26:38 +0000 (10:26 +0100)
committerPeter Xu <peterx@redhat.com>
Mon, 3 Nov 2025 21:04:10 +0000 (16:04 -0500)
commitac7a5f1b72734491318e113a3c64cce103fe93b1
treec220486cc3a4676778af11f40f4a544e57b75ae1
parent8c3843638cbab2da66d3e9e662c03271d3a9490e
scripts/vmstate-static-checker: Fix deprecation warnings with latest argparse

The argparse.FileType() type has been deprecated in the latest argparse
version (e.g. the one from Fedora 43), now causing the test_bad_vmstate
functional test to fail since there are unexpected strings in the output.
Change the script to use pathlib.Path instead to fix the test_bad_vmstate
test and to be prepared for the future when the deprecated FileType gets
removed completely.

Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Link: https://lore.kernel.org/r/20251030092638.39505-1-thuth@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
scripts/vmstate-static-checker.py