Debianbts API¶
Methods¶
| 
 | Returns a list of Bugreport objects. | 
| 
 | Get buglists by usertags. | 
| 
 | Get Buglogs. | 
| 
 | Returns the newest bugs. | 
| 
 | Get list of bugs matching certain criteria. | 
| 
 | Set proxy for SOAP client. | 
Query Debian’s Bug Tracking System (BTS).
This module provides a layer between Python and Debian’s BTS. It provides methods to query the BTS using the BTS’ SOAP interface, and the Bugreport class which represents a bugreport from the BTS.
- 
class debianbts.debianbts.Bugreport¶
- Represents a bugreport from Debian’s Bug Tracking System. - A bugreport object provides all attributes provided by the SOAP interface. Most of the attributes are strings, the others are marked. - 
bug_num¶
- The bugnumber - Type
- int 
 
 - 
severity¶
- Severity of the bugreport - Type
- str 
 
 - Tags of the bugreport - Type
- list of strings 
 
 - 
subject¶
- The subject/title of the bugreport - Type
- str 
 
 - 
originator¶
- Submitter of the bugreport - Type
- str 
 
 - 
mergedwith¶
- List of bugnumbers this bug was merged with - Type
- list of ints 
 
 - 
package¶
- Package of the bugreport - Type
- str 
 
 - 
source¶
- Source package of the bugreport - Type
- str 
 
 - 
date¶
- Date of bug creation - Type
- datetime 
 
 - 
log_modified¶
- Date of update of the bugreport - Type
- datetime 
 
 - 
done¶
- Is the bug fixed or not - Type
- boolean 
 
 - 
done_by¶
- Name and Email or None - Type
- str or None 
 
 - 
archived¶
- Is the bug archived or not - Type
- bool 
 
 - 
unarchived¶
- Was the bug unarchived or not - Type
- bool 
 
 - 
fixed_versions¶
- List of versions, can be empty even if bug is fixed - Type
- list of strings 
 
 - 
found_versions¶
- List of version numbers where bug was found - Type
- list of strings 
 
 - 
forwarded¶
- A URL or email address - Type
- str 
 
 - 
blocks¶
- List of bugnumbers this bug blocks - Type
- list of ints 
 
 - 
blockedby¶
- List of bugnumbers which block this bug - Type
- list of int 
 
 - 
pending¶
- Either ‘pending’ or ‘done’ - Type
- str 
 
 - 
msgid¶
- Message ID of the bugreport - Type
- str 
 
 - 
owner¶
- Who took responsibility for fixing this bug - Type
- str 
 
 - 
location¶
- Either ‘db-h’ or ‘archive’ - Type
- str 
 
 - 
affects¶
- List of Packagenames - Type
- list of str 
 
 - 
summary¶
- Arbitrary text - Type
- str 
 
 
- 
- 
debianbts.debianbts.get_bug_log(nr)¶
- Get Buglogs. - A buglog is a dictionary with the following mappings:
- “header” => string 
- “body” => string 
- “attachments” => list 
- “msg_num” => int 
- “message” => email.message.Message 
 
 - Parameters
- nr (int) – the bugnumber 
- Returns
- buglogs 
- Return type
- list of dicts 
 
- 
debianbts.debianbts.get_bugs(*key_value, **kwargs)¶
- Get list of bugs matching certain criteria. - The conditions are defined by the keyword arguments. - Parameters
- key_value (str) – Deprecated! The positional arguments are treated as key-values. This is deprecated since 2.10.0, please use the kwargs parameters instead. 
- kwargs – - Possible keywords are:
- ”package”: bugs for the given package 
- ”submitter”: bugs from the submitter 
- ”maint”: bugs belonging to a maintainer 
- ”src”: bugs belonging to a source package 
- ”severity”: bugs with a certain severity 
- ”status”: can be either “done”, “forwarded”, or “open” 
- ”tag”: see http://www.debian.org/Bugs/Developer#tags for
- available tags 
 
- ”owner”: bugs which are assigned to owner 
- ”bugs”: takes single int or list of bugnumbers, filters the list
- according to given criteria 
 
- ”correspondent”: bugs where correspondent has sent a mail to 
- ”archive”: takes a string: “0” (unarchived), “1” (archived) or “both” (un- and archived). if omitted, only returns un-archived bugs. 
 
 
 
- Returns
- bugs – the bugnumbers 
- Return type
- list of ints 
 - Examples - >>> get_bugs(package='gtk-qt-engine', severity='normal') [12345, 23456] 
- 
debianbts.debianbts.get_soap_client_kwargs()¶
- 
debianbts.debianbts.get_status(nrs, *additional)¶
- Returns a list of Bugreport objects. - Given a list of bugnumbers this method returns a list of Bugreport objects. - Parameters
- nrs (int or list of ints) – The bugnumbers 
- additional (int) – Deprecated! The remaining positional arguments are treated as bugnumbers. This is deprecated since 2.10.0, please use the nrs parameter instead. 
 
- Returns
- bugs 
- Return type
- list of Bugreport objects 
 
- 
debianbts.debianbts.get_usertag(email, tags=None, *moretags)¶
- Get buglists by usertags. - Parameters
- email (str) – 
- tags (list of strings) – If tags are given the dictionary is limited to the matching tags, if no tags are given all available tags are returned. 
- moretags (str) – Deprecated! The remaining positional arguments are treated as tags. This is deprecated since 2.10.0, please use the tags parameter instead. 
 
- Returns
- mapping – a mapping of usertag -> buglist 
- Return type
- dict 
 
- 
debianbts.debianbts.newest_bugs(amount)¶
- Returns the newest bugs. - This method can be used to query the BTS for the n newest bugs. - Parameters
- amount (int) – the number of desired bugs. E.g. if amount is 10 the method will return the 10 latest bugs. 
- Returns
- bugs – the bugnumbers 
- Return type
- list of int 
 
- 
debianbts.debianbts.set_soap_proxy(proxy_arg)¶
- Set proxy for SOAP client. - You must use this method after import to set the proxy. - Parameters
- proxy_arg (str) –