[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset a85a1d337d26a65036e427341d15e3979f7e9ced by Victor Stinner in branch 'master': bpo-36829: sys.excepthook and sys.unraisablehook flush (GH-13620) https://github.com/python/cpython/commit/a85a1d337d26a65036e427341d15e3979f7e9ced --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13521 pull_request: https://github.com/python/cpython/pull/13620 ___ Python tracker ___

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: Ok, the initial issue has been fixed by adding a new sys.unraisablehook() function. You can kill the process with SIGABRT using the recipe I proposed there: https://bugs.python.org/issue36829#msg343201 As a follow-up, I created bpo-37069: "regrtest: log

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 71c52e3048dd07567f0c690eab4e5d57be66f534 by Victor Stinner in branch 'master': bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488) https://github.com/python/cpython/commit/71c52e3048dd07567f0c690eab4e5d57be66f534 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6dbbe748e101a173b4cff8aada41e9313e287e0f by Victor Stinner in branch 'master': bpo-36829: Document test.support.catch_unraisable_exception() (GH-13554) https://github.com/python/cpython/commit/6dbbe748e101a173b4cff8aada41e9313e287e0f

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-24 Thread STINNER Victor
STINNER Victor added the comment: > Could test.support.catch_unraisable_exception also be documented at > https://docs.python.org/3/library/test.html#module-test.support ? I wrote PR 13554 to document it. -- ___ Python tracker

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

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

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-23 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Could test.support.catch_unraisable_exception also be documented at https://docs.python.org/3/library/test.html#module-test.support ? -- nosy: +xtreak ___ Python tracker

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset df22c03b93ea4620fdf4a0b3cbbbfa7c645af783 by Victor Stinner in branch 'master': bpo-36829: PyErr_WriteUnraisable() normalizes exception (GH-13507) https://github.com/python/cpython/commit/df22c03b93ea4620fdf4a0b3cbbbfa7c645af783 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-1230540: "sys.excepthook doesn't work in threads". -- ___ Python tracker ___ ___

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 13512 to use support.catch_unraisable_exception() in test_io.test_error_through_destructor(). But this PR is associated to bpo-18748 since the main change is related to the io module, not sys.unraisablehook ;-) --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: In PR 13490, Thomas Grainger proposed a cool context manager: @contextlib.contextmanager def throw_unraisable_exceptions(): unraisable = None old_hook = sys.unraisablehook def hook(exc): nonlocal unraisable unraisable = exc

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset e4d300e07c33a9a77549c62d8687d8fe130c53d5 by Victor Stinner in branch 'master': bpo-36829: Add test.support.catch_unraisable_exception() (GH-13490) https://github.com/python/cpython/commit/e4d300e07c33a9a77549c62d8687d8fe130c53d5 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

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

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset a58db9628d0c96cc5b863137fed4e432238f8027 by Victor Stinner in branch '3.7': bpo-36829: Enhance PyErr_WriteUnraisable() (GH-13487) https://github.com/python/cpython/commit/a58db9628d0c96cc5b863137fed4e432238f8027 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: I merged my PR #13187, so I reject PR #13175. In the python-dev thread, there is no consensus in favor of -X abortunraisable option. The few people who pronounce them on this option were more against it.

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: Follow-up: * PR 13487 backports enhancement and bugfix to Python 3.7 * PR 13488 adds _PyErr_WriteUnraisableMsg() and adds 'err_msg' field to sys.unraisablehook * PR 13490 adds test.support.catch_unraisable_exception() --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

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

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

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

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

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

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset ef9d9b63129a2f243591db70e9a2dd53fab95d86 by Victor Stinner in branch 'master': bpo-36829: Add sys.unraisablehook() (GH-13187) https://github.com/python/cpython/commit/ef9d9b63129a2f243591db70e9a2dd53fab95d86 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-15 Thread STINNER Victor
STINNER Victor added the comment: I started a thread on python-dev to discuss the issue: https://mail.python.org/pipermail/python-dev/2019-May/157436.html -- ___ Python tracker

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-14 Thread STINNER Victor
STINNER Victor added the comment: I'm interested to modify regrtest (test runner of the Python test suite) to use sys.unraisablehook(). It would be nice to add an option to display again *all* unraisable exceptions in the test summary, at the end. I did a similar experimentation for any

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-14 Thread STINNER Victor
Change by STINNER Victor : -- title: CLI option to make PyErr_WriteUnraisable abort the current process -> Add sys.unraisablehook() to custom how "unraisable exceptions" are logged ___ Python tracker