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

Sean Farley sean at farley.io
Wed Dec 30 20:36:38 CST 2015


Augie Fackler <raf at durin42.com> writes:

>> On Dec 30, 2015, at 1:07 PM, Sean Farley <sean at farley.io> wrote:
>> 
>> 
>> 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.
>
> Right, but the test extension is emulating behavior I saw in real-world deployment, so I’m concerned that we might be masking a real problem on PyPy here.

Ah, ok, fair enough.


More information about the Mercurial-devel mailing list