Re: zope.test.doctest made into monkey-patches (Was: Circular dependency hell.)
Jim Fulton <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Apr 20, 2010 at 4:46 AM, Lennart Regebro <[email protected]> wrote: > And here is another interesting experiment: > > svn+ssh://[email protected]/repos/main/zope.testing/branches/regebro-doctest-patching > > It replaces the custom doctest.py with monkey-patches. > I will report these to the Python bugtracker as well, although I have > no hope of getting them into Python 2.7. But that doesn't matter much. > :) > > Benefits: We don't have to maintain a separate doctest.py, and we get > the bugfixes from Python. We haven't merged from Python trunk since > 2004, and there are LOADS AND LOADS of bugfixes done on the Python > doctest which we don't have. There are three bugfixes and two > "features" that we have that I now monkey patch in in this branch. > > Drawbacks: If you import zope.testing.doctest, *all* your doctests > will belong to us, so if you have doctests that expect the bugs, your > out of luck. :) > Also, I do not monkey-patch in the footer parsing support. It's too > big, use Manuel instead if you need that. > > > If noone protests, I'll merge this into my "no testrunner branch", > make it support Python 3, and then merge that to trunk, maybe sometime > next week. Strong -1. Monkey patching should be used as a last resort. Monkey patching the standard library is likely to make us look like jack asses. We should switch to manuel, which already has the footnote feature. Let zope.testing.doctest wither and die, or reimplement it as a facade on manuel. Jim -- Jim Fulton _______________________________________________ Zope-Dev maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )