Re: [PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-12 Thread Pulkit Goyal
> > > +finally: > > +if excinfo is not None: > > +raise excinfo[0], excinfo[1], excinfo[2] > > This breaks everything on Python 3. I generally don't want to reject > patches > because of Py3 breakage, but this is syntax error and wouldn't be trivially > fixed in flight. > >

Re: [PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-11 Thread Bryan O'Sullivan
On Tue, Apr 11, 2017 at 6:48 AM, Yuya Nishihara wrote: > Perhaps -1 (= 255) would be better since 1 generally means expected > failure. > Sure. > > +finally: > > +if excinfo is not None: > > +raise excinfo[0], excinfo[1], excinfo[2] > > This breaks everything on Python

Re: [PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-11 Thread Yuya Nishihara
On Mon, 10 Apr 2017 11:51:31 -0700, Bryan O'Sullivan wrote: > # HG changeset patch > # User Bryan O'Sullivan > # Date 1490914899 25200 > # Thu Mar 30 16:01:39 2017 -0700 > # Node ID fdc0de79d651dccee118d19cb6b04f58d33a2727 > # Parent e0dc40530c5aa514feb6a09cf79ab6a3aa2ec331 > atexit: add spe

Re: [PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-11 Thread Yuya Nishihara
On Mon, 10 Apr 2017 13:15:56 -0700, Bryan O'Sullivan wrote: > On Mon, Apr 10, 2017 at 12:49 PM, Jun Wu wrote: > > > I wonder if it's better if the global state is moved to a > > "dispatch.request" > > or "ui" object. That may give threaded request handlers more confidence. > > The new atexit cod

Re: [PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-10 Thread Jun Wu
Excerpts from Bryan O'Sullivan's message of 2017-04-10 13:15:56 -0700: > On Mon, Apr 10, 2017 at 12:49 PM, Jun Wu wrote: > > I wonder if it's better if the global state is moved to a > > "dispatch.request" > > or "ui" object. That may give threaded request handlers more confidence. > > The new at

Re: [PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-10 Thread Bryan O'Sullivan
On Mon, Apr 10, 2017 at 12:49 PM, Jun Wu wrote: > I wonder if it's better if the global state is moved to a > "dispatch.request" > or "ui" object. That may give threaded request handlers more confidence. > The new atexit code is only run during process exit. I was careful to ensure that I wasn't

Re: [PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-10 Thread Jun Wu
Excerpts from Bryan O'Sullivan's message of 2017-04-10 11:51:31 -0700: > [...] > diff --git a/mercurial/util.py b/mercurial/util.py > --- a/mercurial/util.py > +++ b/mercurial/util.py > @@ -3717,3 +3717,9 @@ def bundlecompressiontopics(): > > # convenient shortcut > dst = debugstacktrace > + >

[PATCH 1 of 9] atexit: add special-purpose atexit functionality to util

2017-04-10 Thread Bryan O'Sullivan
# HG changeset patch # User Bryan O'Sullivan # Date 1490914899 25200 # Thu Mar 30 16:01:39 2017 -0700 # Node ID fdc0de79d651dccee118d19cb6b04f58d33a2727 # Parent e0dc40530c5aa514feb6a09cf79ab6a3aa2ec331 atexit: add special-purpose atexit functionality to util In spite of its longstanding us