I'm doing some work with the Red Hat bugzilla and really need the performance increase of calling getbugs with a big list of bugs instead of letting it do the multicall. So I figure I'd just pass multicall=False to the constructor, but it fails:
TypeError: __init__() got an unexpected keyword argument 'multicall'
I have limited understanding of python, but it seems that the kwargs get passed all the way down to BugzillaBase.__init__ which bails if it gets anything other than user, password, url or cookiefile.
Also, I really need to get flags back from getbugs, which requires you pass an extra_fields argument containing 'flags'. Is it at all possible to do this with python-bugzilla or should I just bypass it and make an xmlrpc call myself?
- J<
Firstly Jason, sorry for no one responding for 2 months.
On 08/16/2012 11:07 PM, Jason L Tibbitts III wrote:
I'm doing some work with the Red Hat bugzilla and really need the performance increase of calling getbugs with a big list of bugs instead of letting it do the multicall. So I figure I'd just pass multicall=False to the constructor, but it fails:
TypeError: __init__() got an unexpected keyword argument 'multicall'
I have limited understanding of python, but it seems that the kwargs get passed all the way down to BugzillaBase.__init__ which bails if it gets anything other than user, password, url or cookiefile.
Thanks for the report. Indeed this has been busted for a while, and I fixed it upstream:
http://git.fedorahosted.org/cgit/python-bugzilla.git/commit/?id=8b1a472dc45e...
However multicall=True is the default behavior, so that option is only useful for turning it off.
Also, I really need to get flags back from getbugs, which requires you pass an extra_fields argument containing 'flags'. Is it at all possible to do this with python-bugzilla or should I just bypass it and make an xmlrpc call myself?
Yes:
bz = Bugzilla(url="https://bugzilla.redhat.com/xmlrpc.cgi") fields_i_need = ["flags", "component", ...] buglist = bz.query(bz.build_query(component="python-bugzilla", include_fields=fields_i_need)
If you don't specify every field you need, you'll see a large slow down as we need to hit xmlrpc again. But the above is the fastest way of doing things.
- Cole
On Tue, Oct 16, 2012 at 06:27:45PM -0400, Cole Robinson wrote:
On 08/16/2012 11:07 PM, Jason L Tibbitts III wrote:
Also, I really need to get flags back from getbugs, which requires you pass an extra_fields argument containing 'flags'. Is it at all possible to do this with python-bugzilla or should I just bypass it and make an xmlrpc call myself?
Yes:
bz = Bugzilla(url="https://bugzilla.redhat.com/xmlrpc.cgi") fields_i_need = ["flags", "component", ...] buglist = bz.query(bz.build_query(component="python-bugzilla", include_fields=fields_i_need)
If you don't specify every field you need, you'll see a large slow down as we need to hit xmlrpc again. But the above is the fastest way of doing things.
Is it possible to get better information about groups back from bugzilla using the query interface? I need to get information about whether a bug is marked as private or secure which seems to be implemented via groups. The standard information returned by query is a list that's either empty or populated with ['redhat'] (even though there's multiple groups set). if I force a refresh of the specific bug then I have full gorup information for that bug but that would be slow to do for, say, the list of kernel bugs.
I tried include_fields=['bug_id', 'groups'] to see if that would help but it was the same.
-Toshio
On 10/17/2012 10:49 PM, Toshio Kuratomi wrote:
On Tue, Oct 16, 2012 at 06:27:45PM -0400, Cole Robinson wrote:
On 08/16/2012 11:07 PM, Jason L Tibbitts III wrote:
Also, I really need to get flags back from getbugs, which requires you pass an extra_fields argument containing 'flags'. Is it at all possible to do this with python-bugzilla or should I just bypass it and make an xmlrpc call myself?
Yes:
bz = Bugzilla(url="https://bugzilla.redhat.com/xmlrpc.cgi") fields_i_need = ["flags", "component", ...] buglist = bz.query(bz.build_query(component="python-bugzilla", include_fields=fields_i_need)
If you don't specify every field you need, you'll see a large slow down as we need to hit xmlrpc again. But the above is the fastest way of doing things.
Is it possible to get better information about groups back from bugzilla using the query interface? I need to get information about whether a bug is marked as private or secure which seems to be implemented via groups. The standard information returned by query is a list that's either empty or populated with ['redhat'] (even though there's multiple groups set). if I force a refresh of the specific bug then I have full gorup information for that bug but that would be slow to do for, say, the list of kernel bugs.
I tried include_fields=['bug_id', 'groups'] to see if that would help but it was the same.
Confirmed, I'm guessing that's an bugzilla bug. Strip it down to the simplest reproducer and file a bug in rhbz against Community->Bugzilla.
- Cole
python-bugzilla@lists.stg.fedorahosted.org