[Python-Dev] Summary of Python tracker Issues

martin at v.loewis.de martin at v.loewis.de
Sat Aug 25 13:07:37 CEST 2012


Zitat von francis <francismb at email.de>:

> Is there a easy way to automate this?:
>
> - Get a list the "waiting for review" issues

Not exactly this precise list; instead, a list of issues with a patch:

s=xmlrpclib.ServerProxy("http://bugs.python.org",allow_none=True)
s.filter('issue',dict(keywords=2,status=1})

The other conditions need to be queried separately (although you
could search for both keywords in a single query).

> - Get the last patch

s.display('issue12201','files')

The latest patch will be the one with the highest ID.

To then download the patch, just download

http://bugs.python.org/file<id>/arbitrary-name.diff

Alternatively, do

s.display('file22163', 'content')

> - Try to apply that patch to the version(s) to check if that patch  
> already applies?

This should be possible by just running patch(1) through the subprocess
module (and hg revert afterwards). You may have to do some patch parsing
to find out whether to pass -p0 or -p1.

Regards,
Martin






More information about the Python-Dev mailing list