[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-13 Thread STINNER Victor
STINNER Victor added the comment: Another example of hook: hook_file.patch logs unraisable exception into ~/unraisable.txt. Patch written for my latest PR 13187 (with the new 'msg' parameter). Example of output when running the Python test suite (using multiple processes! ./python -m test

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: > Defaulting to noop when the hook fails means I'll never notice the failure to > be able to debug it I'm not sure that I understood what you mean here. My PR 13187 logs a message into stderr is custom hook fails with a new exception. Well, then you have to

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-09 Thread Thomas Grainger
Thomas Grainger added the comment: > I'm not comfortable with forcing users to use a low-level debugger to debug "unraisable exceptions". Defaulting to noop when the hook fails means I'll never notice the failure to be able to debug it On Fri, 10 May 2019, 00:42 STINNER Victor, wrote: > >

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: > The point for me is that CI will fail if it happens, then I can use gdb to > find out the cause I'm not comfortable with forcing users to use a low-level debugger to debug "unraisable exceptions". I tried PR 13175 on the test suite by forcing the option

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-09 Thread Thomas Grainger
Thomas Grainger added the comment: The point for me is that CI will fail if it happens, then I can use gdb to find out the cause On Thu, 9 May 2019, 23:17 STINNER Victor, wrote: > > STINNER Victor added the comment: > > Ok, let me come back to the initial issue: > > Thomas Grainger: > >

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: Ok, let me come back to the initial issue: Thomas Grainger: > Currently it's quite easy for these errors to go unnoticed. I'd like a way to > easily detect these in CI. nedbat suggested piping the process output to > another tool, and looking for 'Exception

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: too_late_unraisable.py is an example where PyErr_WriteUnraisable() is called very lated during Python finalization to be handled by user code. A destructor (__del__) fails on print() because the stream has been closed. PyErr_WriteUnraisable() is called by

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-08 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 13187 to control how unraisable exceptions are handled. Attached uncollectable.py, gc_callback.py and io_destructor.py examples can be used to test unraisable exceptions. Without my PR: --- $ ./python -Werror uncollectable.py ResourceWarning: gc:

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48315/io_destructor.py ___ Python tracker ___ ___ Python-bugs-list

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48316/site_hook.patch ___ Python tracker ___ ___ Python-bugs-list

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48314/uncollectable.py ___ Python tracker ___ ___ Python-bugs-list

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48313/gc_callback.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13101 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-07 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +13090 stage: -> patch review ___ Python tracker ___ ___

[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-07 Thread Zackery Spytz
Zackery Spytz added the comment: I am working on this issue. -- nosy: +ZackerySpytz title: CLI option to make PyErr_WriteUnraisable abortthe current process -> CLI option to make PyErr_WriteUnraisable abort the current process ___ Python tracker