Add a class to handle a list of Bugs #24
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
I noticed something while automating some stuff with Bugzilla, if we want to get or update data from several bugs, it can take quite some time. This comes from the fact that for each bug, a RPC request is sent although the RPC API allows the use of a list of bugs id for some method (mainly get and update).
So I have written a class that can use this feature. This class inherits from a list (functional append, extend, insert, ...), gets data from server lazily and is much much faster when handling a large number of bugs:
It is only the base of the class, it is missing some method like the
set_*
of the Bug class but the main is here and the rest can be easily added.I also added a small patch to make bugzilla, bug and config modules public when importing bzlib alone. They are the most used modules of the library (the rest is for the cli so not really public) so I thought it would be nice to have this.
Thanks!