[python-bugzilla] Stale reference to _query

Cole Robinson crobinso at redhat.com
Mon Jun 1 14:08:54 UTC 2015


On 06/01/2015 05:26 AM, Florian Weimer wrote:
> The docstring for Bugzilla.query
> 
>     def query(self, query):
>         '''Query bugzilla and return a list of matching bugs.
>         query must be a dict with fields like those in in
> querydata['fields'].
>         Returns a list of Bug objects.
>         Also see the _query() method for details about the underlying
>         implementation.
>         '''
> refers to _query, but this method is no longer very informative:
> 
>     def _query(self, query):
>         # This is kinda redundant now, but various scripts call
>         # _query with their own assembled dictionaries, so don't
>         # drop this lest we needlessly break those users
>         log.debug("Calling Bug.search with: %s", query)
>         return self._proxy.Bug.search(query)
> 
> So it's a bit difficult to figure out how to actually compose queries.
> 

Yeah many of the docstrings are out of date, sorry about that.

If you're looking for code examples I recommend checking what
/usr/bin/bugzilla does, it generally represents the preferred API usage.

- Cole


More information about the python-bugzilla mailing list