Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 608050 - python-bugzilla should use the upstream API to access bugs
python-bugzilla should use the upstream API to access bugs
Status: CLOSED DUPLICATE of bug 886843
Product: Fedora
Classification: Fedora
Component: python-bugzilla (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-06-25 10:23 EDT by Petr Šplíchal
Modified: 2018-04-11 08:39 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-28 16:16:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Petr Šplíchal 2010-06-25 10:23:13 EDT
Description of problem:

Seems python-bugzilla is using bugzilla.getBug() for fetching
bugs, which is to be obsoleted by the upstream API in the future.

Pasting David Lawrence's comment from bug 606695:

> > Petr, which method are you using to get the bug details? Bug.get
> > and Bug.comments or are you using bugzilla.getBug? 
> > 
> > If you are using the latter, then maybe consider updating your
> > scripts to use the former two calls as they are the upstream API
> > and less likely to change going forward. 
> I'm using python-bugzilla's method getbug() which seems to be
> implemented using the old interface:
>     #---- Methods for reading bugs and bug info
>     def _getbug(self,id):
>         '''Return a dict of full bug info for the given bug id'''
>         return self._proxy.bugzilla.getBug(id)

Version-Release number of selected component (if applicable):
Comment 2 RHEL Product and Program Management 2010-06-25 10:42:54 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
Comment 3 Jaroslav Škarvada 2010-06-28 04:34:37 EDT
The new API seems to be implemented in class RHBugzilla3. From the documentation:

> By default, _getbugs will multicall getBug(id) multiple times, rather than
> doing a single Bug.get(idlist) call. You can disable this behavior by
> setting the 'multicall' property to False. This will make it somewhat
> faster, but any missing/unreadable bugs will cause the entire call to
> Fault rather than returning any data.

From the above, do you think the multicall property should defaults to False?
Comment 4 Will Woods 2010-06-28 10:43:41 EDT
No. What should actually be done is what the bug summary says - the RHBugzilla3 class should use Bug.get(idlist) instead of multicalling bugzilla.getBug().

The reason RHBugzilla3 was still using bugzilla.getBug() instead of Bug.get() was that Bug.get() will throw a Fault (and return no results) if any of the given bug ids is invalid. 

But now that Bug.get() has the 'permissive' argument - which more closely models the old RHBZ behavior - we can move to the upstream method.
Comment 5 Bug Zapper 2010-07-30 08:14:24 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
Comment 6 Cole Robinson 2012-06-06 19:12:32 EDT
Still valid, moving to F17
Comment 7 Cole Robinson 2012-12-28 16:16:13 EST
Much of this is done upstream now. The next rhbz update is actually going to remove a ton of custom API calls, so just duping this report to the bug tracking all that work

*** This bug has been marked as a duplicate of bug 886843 ***

Note You need to log in before you can comment on or make changes to this bug.