[PATCH] test-bundle2-format.t: force gc so a GeneratorExit will be thrown

Sean Farley sean at farley.io
Wed Dec 30 12:07:40 CST 2015


Augie Fackler <raf at durin42.com> writes:

> On Tue, Dec 22, 2015 at 10:47:09PM -0800, Bryan O'Sullivan wrote:
>> # HG changeset patch
>> # User Bryan O'Sullivan <bos at serpentine.com>
>> # Date 1450853226 28800
>> #      Tue Dec 22 22:47:06 2015 -0800
>> # Node ID b74ccb8db88fb4f333061215d67dba5065bc56ab
>> # Parent  079eba011d07eb82319082116528abddb6a7b178
>> test-bundle2-format.t: force gc so a GeneratorExit will be thrown
>>
>> PyPy has looser semantics than CPython for when a generator's close
>> method will be called.  Forcing the gc causes it to be called at
>> the right moment.
>
> I'm a little weirded out by this fix, because it worries me that it is
> going to choke us in weird ways in production. Can you allay that fear at all?

This is just a test extension so it didn't set off any alarms for me, FWIW.


More information about the Mercurial-devel mailing list