[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-01 Thread Georg Brandl
New submission from Georg Brandl : Currently, the atexit docs state "The order in which the functions are called is not defined" in the introduction and "all functions registered are called in last in, first out order" in the docs of the atexit() function. While the latter is correct, I don'

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: I believe it should be guaranteed behavior and that code may reasonably want to have a predictable sequence of unwinding behaviors. -- nosy: +rhettinger ___ Python tracker ___

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: It is guaranteed by libc's atexit(3), and should also be guaranteed here. -- nosy: +neologix ___ Python tracker ___ __

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-01 Thread Larry Hastings
Larry Hastings added the comment: +1 to guaranteeing the order. -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I believe it should be guaranteed behavior and that code may > reasonably want to have a predictable sequence of unwinding behaviors. Agreed. -- ___ Python tracker

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: Here's a patch. I read the implementation to find out what it does, then documented it. Happily it does the sane thing. -- keywords: +patch Added file: http://bugs.python.org/file26230/larry.atexit.1.diff ___ Pyth

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here's a patch. I read the implementation to find out what it does, > then documented it. Happily it does the sane thing. Is it tested for? -- ___ Python tracker

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Éric Araujo
Éric Araujo added the comment: See #9788 for previous discussion. -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list m

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch wording is fine. However, I would avoid the "note" markup. It is visually distracting and there isn't a reason to pull this out of the main text. -- ___ Python tracker

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: > Is it tested for? Amusingly enough, yes. test_order() in Lib/test/test_atexit.py already ensures reverse order. -- ___ Python tracker ___

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: > I would avoid the "note" markup. It is visually distracting > and there isn't a reason to pull this out of the main text. I think it's an improvement; it helps draw the eye to an important warning. Does anyone else have an opinion one way or another? -

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Does anyone else have an opinion one way or another? I'm neutral. -- ___ Python tracker ___ ___

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with Raymond. You might, however, emphasize 'normal' in 'normal interpreter termination'. That is the key point. The 'note' merely explains 'abnormal'. -- nosy: +terry.reedy ___ Python tracker

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +benjamin.peterson, giampaolo.rodola, meador.inge, python-dev ___ Python tracker ___ ___ Python-bugs

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-14 Thread Larry Hastings
Larry Hastings added the comment: Okay, I'll remove the ".. note". Checking in shortly. -- ___ Python tracker ___ ___ Python-bugs-li

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8b520b6f654 by Larry Hastings in branch 'default': - Issue #15233: Python now guarantees that callables registered with http://hg.python.org/cpython/rev/f8b520b6f654 -- ___ Python tracker

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-14 Thread Larry Hastings
Larry Hastings added the comment: So, it's checked in to trunk. Shall I also backport to 2.7 and 3.2 as the issue suggests? -- ___ Python tracker ___ _

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Shall I also backport to 2.7 and 3.2 as the issue suggests? If the tests are there, yes! -- ___ Python tracker ___ _

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-15 Thread Larry Hastings
Larry Hastings added the comment: I have been meditating on this, and I'm not sure we should change 2.7. 3.2 might be okay. The thing is, I fear we're not just talking about CPython implementation details, we're talking about the Python Standard Library. The existing documentation clearly

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for backport. There's no benefit to leaving ambiguity floating about, nor was there ever any intention for the behavior to have been different. -- ___ Python tracker _

[issue15233] atexit: guarantee order of execution of registered functions?

2012-10-10 Thread Charles-François Natali
Charles-François Natali added the comment: Ping. Like Raymond, I think there's no reason to leave ambiguity in 2.7 and 3.2, so this doc patch is probably worth backporting. -- ___ Python tracker _