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

Yuya Nishihara yuya at tcha.org
Thu Dec 31 06:46:16 CST 2015


On Wed, 30 Dec 2015 10:07:40 -0800, Sean Farley 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.

Perhaps, his concern is whether 4bc3707f3e67 goes well on PyPy or not.

https://selenic.com/repo/hg/rev/4bc3707f3e67


More information about the Mercurial-devel mailing list