[issue27035] Cannot set exit code in atexit callback

2021-08-19 Thread Mike Hommey


Mike Hommey  added the comment:

> I think we should change the documentation to expand the parenthetical " 
> (unless SystemExit is raised)" to a complete explanation of that special case.

That would not be enough, since the case for other exceptions would still be 
ambiguous, as the described behavior ("After all exit handlers have had a 
chance to run the last exception to be raised is re-raised.") would imply the 
exit code would be altered, like when exceptions are raised in normal context. 
In 2.7 the only exception that _did_ change the exit code was SystemExit.

------
nosy: +Mike Hommey

___
Python tracker 
<https://bugs.python.org/issue27035>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27035] Cannot set exit code in atexit callback

2021-08-19 Thread Mike Hommey


Mike Hommey  added the comment:

> In 2.7 the only exception that _did_ change the exit code was SystemExit.

(and only if it was the last thrown exception)

--

___
Python tracker 
<https://bugs.python.org/issue27035>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2020-04-06 Thread Mike Hommey


Mike Hommey  added the comment:

This is still a problem in python 3.7 (and, I guess 3.8).

When not even giving a max_workers, it fails with a ValueError exception on 
_winapi.WaitForMultipleObjects, with the message "need at most 63 handles, got 
a sequence of length 63"

That happens with max_workers=None and max_workers=61 ; not max_workers=60.

I wonder if there's an off-by-one in this test: 
https://github.com/python/cpython/blob/7668a8bc93c2bd573716d1bea0f52ea520502b28/Modules/_winapi.c#L1708

------
nosy: +Mike Hommey

___
Python tracker 
<https://bugs.python.org/issue26903>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com