[python-bugzilla] Bug.get_bugs removed in favor of Bug.get
Cole Robinson
crobinso at redhat.com
Tue Jan 27 19:50:11 UTC 2015
On 01/27/2015 01:52 PM, Dustin Mitchell wrote:
> I recently started getting tracebacks:
>
> CRITICAL:bugzilla_mozilla:Worker for [bugzilla_mozilla] failed: <Fault
> -32601: "The requested method 'Bug.get_bugs' was not found.">
> TRACE Traceback (most recent call last):
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/__init__.py",
> line 470, in _aggregate_issues
> TRACE for issue in service.issues():
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/bz.py",
> line 200, in issues
> TRACE ) for bug in bugs
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/bz.py",
> line 199, in <genexpr>
> TRACE ((col, _get_bug_attr(bug, col)) for col in self.COLUMN_LIST)
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/bz.py",
> line 221, in _get_bug_attr
> TRACE return getattr(bug, attr, [])
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/bug.py",
> line 102, in __getattr__
> TRACE self.refresh(extra_fields=[name])
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/bug.py",
> line 115, in refresh
> TRACE extra_fields=self._bug_fields + (extra_fields or []))
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
> line 976, in _getbug
> TRACE extra_fields=extra_fields)[0]
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
> line 948, in _getbugs
> TRACE r = self._proxy.Bug.get_bugs(getbugdata)
> TRACE File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__
> TRACE return self.__send(self.__name, args)
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
> line 165, in _ServerProxy__request
> TRACE ret = ServerProxy._ServerProxy__request(self, methodname, params)
> TRACE File "/usr/lib64/python2.7/xmlrpclib.py", line 1591, in __request
> TRACE verbose=self.__verbose
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
> line 260, in request
> TRACE return self._request_helper(url, request_body)
> TRACE File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
> line 242, in _request_helper
> TRACE raise sys.exc_info()[1]
> TRACE Fault: <Fault -32601: "The requested method 'Bug.get_bugs' was
> not found.">
>
> https://www.bugzilla.org/docs/4.2/en/html/api/Bugzilla/WebService/Bug.html
> says that `get_bugs` exists only for compatibility with the 3.0 API.
> Apparently the Mozilla Bugzilla instance has been upgraded to a
> version of 4.2 (4.2.13, I think) which no longer has this
> compatibility mechanism.
>
> It'd be great to either switch wholesale, or automatically fall back
> or forward from one method to the other, rather than simply failing.
>
Thanks for the report. I just switched it to Bug.get, which has been around
since bugzilla 3.2. I'll get a release out in the next few weeks
commit 7a1c8367f8cff7ff1ab821e04da170c26b786a6e
Author: Cole Robinson <crobinso at redhat.com>
Date: Tue Jan 27 14:46:04 2015 -0500
base: Use Bug.get instead of deprecated Bug.get_bugs
- Cole
More information about the python-bugzilla
mailing list