[virt-manager/f14/master] fix python 2.7 incompatibility (bz 620216)

dmalcolm dmalcolm at fedoraproject.org
Mon Aug 2 19:30:34 UTC 2010


commit 4972b9170cbe7dcaf51f28baf062941498775c64
Author: David Malcolm <dmalcolm at redhat.com>
Date:   Mon Aug 2 15:32:57 2010 -0400

    fix python 2.7 incompatibility (bz 620216)

 ....8.4-ignore-python27-deprecation-warnings.patch |   13 +++++++++++++
 virt-manager.spec                                  |    9 ++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/virt-manager-0.8.4-ignore-python27-deprecation-warnings.patch b/virt-manager-0.8.4-ignore-python27-deprecation-warnings.patch
new file mode 100644
index 0000000..d96f639
--- /dev/null
+++ b/virt-manager-0.8.4-ignore-python27-deprecation-warnings.patch
@@ -0,0 +1,13 @@
+diff --git a/src/virt-manager.py.in b/src/virt-manager.py.in
+index fefa1c3..c285dac 100755
+--- a/src/virt-manager.py.in
++++ b/src/virt-manager.py.in
+@@ -273,7 +273,7 @@ def main():
+     # on as if all were fine. Ultimately bad stuff happens,
+     # so lets catch it here & get the hell out...
+     import warnings
+-    warnings.filterwarnings('error', module='gtk')
++    warnings.filterwarnings('error', module='gtk', append=True)
+     try:
+         import gobject
+ 
diff --git a/virt-manager.spec b/virt-manager.spec
index d5f8e68..e3fb250 100644
--- a/virt-manager.spec
+++ b/virt-manager.spec
@@ -8,7 +8,7 @@
 
 Name: virt-manager
 Version: 0.8.4
-Release: 2%{_extra_release}
+Release: 3%{_extra_release}
 Summary: Virtual Machine Manager
 
 Group: Applications/Emulators
@@ -39,6 +39,9 @@ Patch9: %{name}-%{version}-vnc-auto-keymap.patch
 Patch10: %{name}-%{version}-vnc-reconnect-traceback.patch
 # Fix remote VNC connection with zsh as default shell
 Patch11: %{name}-%{version}-vnc-zsh.patch
+# Don't override the "ignore deprecation warnings" default, which lead to a
+# C-assertion failure of pygtk2 on startup under python 2.7 (bz 620216):
+Patch12: %{name}-%{version}-ignore-python27-deprecation-warnings.patch
 
 # These two are just the oldest version tested
 Requires: pygtk2 >= 1.99.12-6
@@ -108,6 +111,7 @@ management API.
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 %build
 %configure
@@ -186,6 +190,9 @@ fi
 %{_datadir}/dbus-1/services/%{name}.service
 
 %changelog
+* Mon Aug  2 2010 David Malcolm <dmalcolm at redhat.com> - 0.8.4-3.fc14
+- fix python 2.7 incompatibility (bz 620216)
+
 * Thu May 27 2010 Cole Robinson <crobinso at redhat.com> - 0.8.4-2.fc14
 - Only close connection on specific remote errors
 - Fix weird border in manager UI (bz 583728)


More information about the scm-commits mailing list