[Python-Dev] Anyone can do patch reviews (was: Enhanced tracker privileges...)

Ezio Melotti ezio.melotti at gmail.com
Tue Apr 27 17:57:57 CEST 2010


On Tue, Apr 27, 2010 at 5:16 PM, Barry Warsaw <barry at python.org> wrote:

> On Apr 27, 2010, at 02:40 PM, exarkun at twistedmatrix.com wrote:
>
> >On 01:38 pm, rdmurray at bitdance.com wrote:
>
> >>    2) have unit tests that fail before the patch and succeed after
> >
> >This list would make a good addition to one of the cpython development
> >pages.  If potential contributors could find this information, then
> >they'd be much more likely to participate by doing reviews.
>
> It would be kind of cool if there were some best practices for running said
> unittest both with and without the patch enabled.  Kind of like using
> #ifdefs
> in C but without all the commenting-out-commenting-in error proneness.  I
> guess you could do something like
>
>    if os.getenv('BUG1234'):
>        # Patch the frobnicator to not bloviate.
>
>
When I'm writing the patch it's usually easy, I write the tests, see that
they fail, write the fix, see that they pass.
When I'm reviewing the patch, I apply the patch, see that the tests pass,
svn revert the fix, check that they fail.
Most of the patches affect just a couple of files, so applying the whole
patch and then revert is usually trivial and probably easier than having to
deal with two separate files for patch and tests.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100427/2a157977/attachment.html>


More information about the Python-Dev mailing list