Patch for Python 3 Support
by Ralph Bean
Hello all,
I created a patch to update python-bugzilla to work on both python 2
and python 3. The unit tests all pass under both py2.7 and py3.2.
I have tested the login and query commands by hand on py2.6, py2.7,
and py3.2.
http://threebean.org/patches/python-bugzilla-Python3-support.patch
The patch is against the master branch (7ca8a60). If I should
recreate it against another branch, please let me know.
I'm also willing to update and maintain a spec file supporting both
versions if and when that time comes.
Cheers-
-Ralph
10 years, 9 months
[PATCH] Detection of the RH Bugzilla by the extension() call
by Lukas Zachar
Part of the planed upgrade to the v4.4 of RH Bugzilla is the removal of
mirrored XMLRPC calls (rhbz#822007). Among others the
bugzilla.getProdInfo() which is currently used as indicator of RH
Bugzilla.
I believe the Bugzilla.extensions() call can be used as a indicator
instead, although it is marked as unstable.
---
bugzilla/__init__.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/bugzilla/__init__.py b/bugzilla/__init__.py
index 1c9f3f5..2f354d9 100644
--- a/bugzilla/__init__.py
+++ b/bugzilla/__init__.py
@@ -29,11 +29,12 @@ def getBugzillaClassForURL(url):
bzversion = ''
c = None
- # Check for a RH-only method
+ # Check for a Red Hat extension
try:
- log.debug("Checking for RH Bugzilla method bugzilla.getProdInfo()")
- prodinfo = s.bugzilla.getProdInfo()
- rhbz = True
+ log.debug("Checking for Red Hat Bugzilla extension")
+ extensions = s.Bugzilla.extensions()
+ if extensions.get('extensions', {}).get('RedHat', False):
+ rhbz = True
except xmlrpclib.Fault:
pass
log.debug("rhbz=%s" % str(rhbz))
--
1.7.1
11 years, 3 months