Monday, 23 July 2007


Dear lazyweb, Is there any reasonable way to reorder the tabs of a GtkNotebook in glade-3? I needed to do it to add a tab on a configuration dialog, and couldn't find any. I worked around it by editing the XML file by hand, but it just feels counter-productive and ugly...

Thursday, 19 July 2007

bug-triage Debian Packages

Thanks to the timely efforts of Loïc Minier, a more usable (even though still featureless) bug-triage version (0.1-2) has found its way to the Debian Archive, alongside with the shining new btsutils 0.2-1. Now it does return something on queries... The development is also progressing, the current version in git can already show the upstream bugs for a given Debian package whose upstream uses bugzilla.

Monday, 16 July 2007

btsutils 0.2 release

For what can be read on Planet SoC, computer problems seems to be the norm between SoC students... I've got my part of this cake today with a power cut and some strange /dev permissions when my PC got back... Fortunately it was somewhat easy to solve (I believe it was the udev upgrade which did the trick), so I've been able to release btsutils 0.2. Please take a look on the announcement for more details. Still on the SoC side, thanks to the great work from the Debian ftpmaster team and Loïc Minier, the packages python-btsutils and python-bzutils have made their way through the NEW queue and are on the Debian official archive. And finally, on Debian side, Loïc Minier also uploaded libgnomedb3 3.0.0-2, a bug fix release for libgnomedb closing two bugs. Thanks, Loïc.

Monday, 9 July 2007

Summer of Code mid-term report

I. Introduction Today, the mid-term evaluations of the Google Summer of Code starts. It means it's a good for a comprehensive summary of what I've done so far. For those who don't remember, My GSoC project is the Bug Triaging and Forwarding Tool, whose aim is to help triaging of Debian bug reports. On my proposal, I had included the following timeline:
  • April - May: Study of the resources available for use in the project (Debian BTS SOAP/LDAP interface, Bugzilla interaction resources, etc) and the design of the tool. Request needed unavailable features, if any, with patches if possible
  • May - July: Development of initial interface and code to interact with Debian BTS
  • August: Development of Bugzilla plugin
During the proposals evaluations and the community bounding period, it was pointed to me that there's already a lot of good tools to handle bug reports, so I've changed this a bit and already started to work on BTS-Bugzilla interaction, which seems to be the more novel part of the tool. The development has been fragmented in three modules: btsutils, bzutils and bug-triage. II. btsutils The btstutils is a python module to interact with the Debian Bug Track System. Currently, it can query the bts by bug number, package, source package, maintainer, submitter and usertag. For each bug, it returns bug number, package, summary, status, severity, submitter and tags. Support for returning usertags is under way. Ths btsutils can use html or soap to access the bug data, and has also a backend-agnostic module wwith tries the best method and, if that fails, tries the other. Steffano Zacchiroli has offered me to include the btsutils on the debian-bundle, a bundle of python modules for dealing with Debian infrastrcture. I'm very excited by this idea, and believe that if all or at least some of the Debian tools which interact with BTS end using a standardized module for access, this might end up being the major contribution of my GSoC project for the Debian community. III. bzutils The bzutils is similar to the bzutils, but is to interact with bugzillas instead. Currently it can do queries based on GNOME's bugzilla boogle and the more generic boolean charts. The later works (at least) on GNOME, KDE and standard bugzilla (i.e., landfill). For each bug, it returns bug id, product, component, status, resolution, reporter, assignee, summary, priority and severity. IV. bug-triage The bug-triage is the Bug triaging and forwarding tool. It's being developed using python, gtk and glade. Currently, it can query the BTS using any of the btsutils' supported fields (even though the usertags aren't really accessible through the interface yet). It can also launch one of the returned bug reports in a web browser. Integration with bugzillas is under development. It already has an interface to establish links between Debian packages and upstream bugzilla's address, product and component. The next steps will be to add an upstream button in the toolbar/menu and make it show the bugs selected through these info, allowing the user to mark the bug as forwarded to one of them. V. The future After that, I'll work on these features (in no particular order): filling a new upstream bug using the Debian bug data as a starting point, more advanced filtering options to filter the upstream bugs (such as filtering by words in the bug summary, and maybe through backtraces if available) and more ways to manipulate the BTS through the interface. To be sincere, it seems this project won't be as advanced as I would like on the end of the GSoC. There are some new, unexpected (and good ^_^) things going on my life, which are taking some of the time I expected to dedicate to GSoC, which means I'll likely keep the current pace until the end of the project (I expected to increase it during July). Even so, I believe the project is going on a good path, and I hope it'll be very useful for the Debian community.

Thursday, 5 July 2007

Debbugs, SOAP and Usertags

A small bit of info that can be hard to find: It's possible to call debbugs' SOAP get_usertag function passing only an user as argument, to get all usertags set for this user and all bugs with each of these tags, like this:
>>> import SOAPpy
>>> proxy = SOAPpy.SOAPProxy("", "Debbugs/SOAP/V1")
>>> proxy.get_usertags("")

Tuesday, 3 July 2007

Debbugs SOAP

Following the hints by Bastian Venthur, which answered my last post (thanks, Bastian), and some suspicious mails to debian-debbugs, I've finally gotten to know that the debbugs' SOAP get_bugs is finally fixed. Of course, this means that btsutils has just got its query function implemented in SOAP besides the html parsing stuff. Also great news on the debbugs' SOAP camp is that get_status now works on more than one bug per call. Yay! Debbugs people rocks. I'm not realy in place to ask something more drom these great folks, but it would be great if those cool features they keep adding were announced somewhere. Now, the downside: Querying through SOAP is still quite slower than parsing the html. According to Python's timeit, getting a list with the bugs on all packages maintained by me takes about 17 seconds, while the same operation through HTML parsing takes about 10 seconds. I believe this differences comes from accessing the server one time on the HTML parsing and two times (get_bugs and get_status) on the SOAP.

Sunday, 1 July 2007

Exception handling on PyGTK applications

A feature I've been wanting to implement on bug-triage for some time now is to have unhandled exceptions shown in a gtk message dialog instead of getting lost on the terminal. And I've finally got it working now. At first, I had some vague impression of having read about changing the default exception handler on Python. Maybe I've just mixed things up, but I couldn't find anything about that today (maybe it was Java?). Instead, I found out some information about Python decorators. This is the first time I've seen anything like the decorators, and I must say this is a concept a bit hard to get used to, at least for me. Basically, if is a function that gets a callable (ie, a function or anything else that can be called) and returns another callable to be used in its place -- usually the original one with some nice extra. I've created a python decorator to wrap the function call it decorates inside a try statement, whose except clause show some info about any exception it gets. The code can be seen on the bug-triage git repository. On the linked file, errorhandler is the decorator and msg_exception takes an exception as argument and shows a message dialog. Applying the decorator to a function is simple, import it and add an @errorhandler just before its declaration. Some references on decorators: PS: I just got really happy to discover that this blogger/blogspot draft autosaving stuff works...