[Python-Dev] Encouraging developers

"Martin v. Löwis" martin at v.loewis.de
Tue Mar 6 16:19:59 CET 2007


A.M. Kuchling schrieb:

> For example, our oldest bug is http://www.python.org/sf/214033, opened
> 2000-09-11, and is that (x?)? is reported as an error by the SRE regex
> parser; the PCRE engine and Perl both accept it.  Fixing it requires
> changing sre_parse, figuring out what to do (should it be equivalent
> to '(x?)' or to '(x)?', and then being very sure that no other
> patterns are broken by the change.  I suspect that fixing this bug
> properly by researching the right answer, implementing it, and adding
> tests would take me a half-day's worth of work.  If modifying
> sre_parse is very difficult, it could take longer.

I just applied a patch by Aaron Watters for HTMLParser, which was three
years old. The patch wasn't contributed in unified diff, it hadn't test
cases and documentation changes, and it changed the way HTMLParser does
unescaping of references in HTML attributes. It was a fairly small 
change, yet it contained a bug, and a likely-to-occur boundary behavior
(entity references for undefined entities). In testing, I found that
HTMLParser (incorrectly) supports ' and decided to continue to
support it for compatibility.

All in all, it took me about one hour to review and apply this patch
(again, even though it changed only 20 lines or so). I felt it wouldn't
have been fair to Aaron to go back and ask for unified diffs etc now
that the patch had been sitting there for several years. Yet, in all
these years, nobody else commented that the patch was incomplete,
let alone commenting on whether the feature was desirable.

Regards,
Martin



More information about the Python-Dev mailing list