[Distutils] buildout/distribute recursion error fixed
Reinout van Rees
reinout at vanrees.org
Tue Nov 10 15:00:56 CET 2009
On 2009-11-05, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
> On Thu, Nov 5, 2009 at 9:32 AM, Reinout van Rees <reinout at vanrees.org> wrote:
>> Hi all,
>>
>> Several people have seen a hard-to-reproduce recursion error when running
>> buildout in combination with distribute. You'd get 200 lines of
>> "distribute".
>>
>> Good news: the problem has been identified. And I've fixed it on a
>> zc.buildout branch (branches/reinout_distribute_upgrade_check). Tarek will
>> test it and probably/hopefully release it real soon, wink, wink.
>
> Yes, thanks for the fix/work ! It looks nice and also simplifies the code.
>
> Before it's merged in trunk and eventually released, we need to :
>
> - add a test demonstrating this bug in easy_install.txt
Buildout's test aren't setup to test this kind of things directly. I *did*
add a test to easy_install.txt that tests whether the offending _get_dist()
(which starts the recursion) gets called. This fails before my fix and
succeeds afterwards.
On Tarek's suggestion, I moved the test out of easy_install.txt to a separate
file to keep the corner case test out of the user documentation.
> - manually test the various scenarii (these are not fully covered with
> zc.buildout unittests because the assmption is made that python don't
> have setuptools installed):
>
> - nude python, buildout without --distribute, plone buildout cfg file
> - python with setuptools, buildout witout --distribute, plone
> buildout cfg file
> - python with distribute < 0.6.8, buildout witout --distribute,
> plone buildout cfg file
> - these 3 tests *with* --distribute
I did not test all the variants, that would cost me waaaay too much time for
such a small fix. To be honest.
I did reproduce it with setuptools + distribute with and without the fix with
the development buildout itself. That executes the changed code point enough.
Reinout
--
Reinout van Rees - reinout at vanrees.org - http://reinout.vanrees.org
Software developer at http://www.thehealthagency.com
"Military engineers build missiles. Civil engineers build targets"
More information about the Distutils-SIG
mailing list