[python-bugzilla/el5] Add patch for 2.4 back compat

Cole Robinson crobinso at fedoraproject.org
Thu Jun 14 23:38:24 UTC 2012


commit 6953455eb872b276cb247c2dcf7f3a5270b650cf
Author: Cole Robinson <crobinso at redhat.com>
Date:   Thu Jun 14 19:37:53 2012 -0400

    Add patch for 2.4 back compat

 python-bugzilla-2.4-backcompat.patch |   23 +++++++++++++++++++++++
 python-bugzilla.spec                 |    4 ++--
 2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/python-bugzilla-2.4-backcompat.patch b/python-bugzilla-2.4-backcompat.patch
new file mode 100644
index 0000000..29f810d
--- /dev/null
+++ b/python-bugzilla-2.4-backcompat.patch
@@ -0,0 +1,23 @@
+diff -rup python-bugzilla-0.7.0/bugzilla/base.py foo/bugzilla/base.py
+--- python-bugzilla-0.7.0/bugzilla/base.py	2012-06-06 18:42:04.000000000 -0400
++++ foo/bugzilla/base.py	2012-06-14 19:36:03.782879201 -0400
+@@ -19,8 +19,8 @@ import base64
+ import tempfile
+ import logging
+ import locale
+-import email.utils
+-from email.header import decode_header
++import email.Utils
++from email.Header import decode_header
+ 
+ log = logging.getLogger('bugzilla')
+ 
+@@ -63,7 +63,7 @@ def replace_getbug_errors_with_None(rawl
+ def decode_rfc2231_value(val):
+     # BUG WORKAROUND: decode_header doesn't work unless there's whitespace
+     # around the encoded string (see http://bugs.python.org/issue1079)
+-    val = email.utils.ecre.sub(' \g<0> ', val) # Workaround: add whitespace
++    val = email.Utils.ecre.sub(' \g<0> ', val) # Workaround: add whitespace
+     val = val.strip('"') # remove quotes
+     return ''.join(f[0].decode(f[1] or 'us-ascii') for f in decode_header(val))
+ 
diff --git a/python-bugzilla.spec b/python-bugzilla.spec
index 0e03459..294c38e 100644
--- a/python-bugzilla.spec
+++ b/python-bugzilla.spec
@@ -9,7 +9,7 @@ Group:          Development/Languages
 License:        GPLv2+
 URL:            https://fedorahosted.org/python-bugzilla
 Source0:        https://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz
-
+Patch1: %{name}-2.4-backcompat.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -28,7 +28,7 @@ for interacting with bugzilla from shell scripts.
 
 %prep
 %setup -q
-
+%patch1 -p1
 
 %build
 %{__python} setup.py build


More information about the scm-commits mailing list