Bug#508812: Reusing python-btsutils for bts-link

Stefano Zacchiroli zack at debian.org
Wed Dec 17 13:10:59 UTC 2008


On Wed, Dec 17, 2008 at 01:22:28PM +0100, Bastian Venthur wrote:
> just a quick question. Are the debianbts-python bindings supposed to
> go into an extra package, will we reuse python-debianbts or is it
> supposed to go into python-debian? Depending on the answer we can
> open or use the appropriate mailinglist.

My initial idea (years ago) was to *merge* it into
python-debian. Still, I care more about integration (if there is
margin to do that) and "marketing" of the bts lib, that were the two
main reasons for proposing the merge. A priori, they can possibly be
both moot.

> class Bugreport(object):
>     """Represents a bugreport from Debian's Bug Tracking System."""
> 
>     def __init__(self, nr):
>         self.nr = unicode(nr)
>         self.summary = None
>         self.submitter = None
>         self.status = None
>         self.severity = None
>         self.fulltext = None
>         self.package = None
>         self.firstaction = None
>         self.lastaction = None
>         self.tags = None
> 
>     def __str__(self):
>         s  = "Bug: %s\n" % self.nr
>         s += "Package: %s\n" % self.package
>         s += "Summary: %s\n" % self.summary
>         s += "Submitter: %s\n" % self.submitter
>         s += "Status: %s\n" % self.status
>         s += "Severity: %s\n" % self.severity
>         s += "Tags: %s\n" % self.tags
>         s += "Firstaction: %s\n" % self.firstaction
>         s += "Lastaction: %s\n" % self.lastaction
>         s += "Fulltext: %s\n" % self.fulltext
>         return s

What about attachments? I'd love to have an easy way to access what
has been posted to bug reports as attachment, as in a lot of cases
they represent a patch or something else useful to access.

Similarly, why you just have a fulltext? It is a fulltext of what? The
whole buglog? That should be better accessed with some (possibly
pre-existing in the python stdlib) mailbox-like abstraction.

Also, but possibly as a more long term goal, it would be really nice
to provide some (heuristic and optional) parsing of each message in
the bug log, especially the first one. At least for some widespread
classes of bug report tools (reportbug and reportbug-ng for example)
we can easily split the text, the meta-headers, the additional info,
...

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime



More information about the pkg-python-debian-discuss mailing list