From 404507b3ad4bbdaebe6318856a2ad0ae5e9f3cb7 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 8 Feb 2021 12:59:29 -0500 Subject: [PATCH] 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 --- virt-manager.spec | 2 +- virtManager/virtmanager.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/virt-manager.spec b/virt-manager.spec index ef317cace..d18eea321 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -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 diff --git a/virtManager/virtmanager.py b/virtManager/virtmanager.py index f6d538bcc..b1a4c01c7 100755 --- a/virtManager/virtmanager.py +++ b/virtManager/virtmanager.py @@ -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)