virt-manager: Require pygobject >= 3.31.3

This is the first version that universally treats a None value as
bool False. Most recent code changes have been developed against this
version of pygobject, and several backwards incompatible None usages
have slipped in, and I suspect there's more lurking.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2021-02-08 12:59:29 -05:00
parent 8bf03dad2c
commit 404507b3ad
2 changed files with 8 additions and 3 deletions

View File

@ -19,7 +19,7 @@ Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.ta
Requires: virt-manager-common = %{verrel}
Requires: python3-gobject
Requires: python3-gobject >= 3.31.3
Requires: gtk3 >= 3.22.0
Requires: libvirt-glib >= 0.0.9
Requires: gtk-vnc2

View File

@ -22,10 +22,15 @@ from virtinst import log
from .lib.testmock import CLITestOptionsClass
# pygobject commit that I believe universally changed bool arguments
# to handle passed None. Without this, None usage keeps slipping into
# the code, so add the requirement.
# https://github.com/GNOME/pygobject/commit/6c69fc7b582ec1fd3faef4de3fade9a0cb7f8c05
_PYGOBJECT_VERSION = "3.31.3"
try:
gi.check_version("3.22.0")
gi.check_version(_PYGOBJECT_VERSION)
except (ValueError, AttributeError): # pragma: no cover
print("pygobject3 3.22.0 or later is required.")
print("pygobject3 %s or later is required." % _PYGOBJECT_VERSION)
sys.exit(1)