[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread STINNER Victor
STINNER Victor added the comment: Maybe the context manager could recreate attributes (set them to None) if the context manager is used wice, but I'm not sure that I don't want to promote to reuse catch_threading_exception(). I didn't check if catch_threading_exception() creates a ref

[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 58f2c7f424fe91ba035918f0f66306af73a37543 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-37526: Add support.catch_threading_exception() (GH-14664) (GH-14666)

[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +14474 pull_request: https://github.com/python/cpython/pull/14666 ___ Python tracker ___

[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 91b4f7ab7f9a5e0908b91379ee085ae087a76483 by Victor Stinner in branch 'master': bpo-37526: Add support.catch_threading_exception() (GH-14664) https://github.com/python/cpython/commit/91b4f7ab7f9a5e0908b91379ee085ae087a76483 --

[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-36829: Add test.support.catch_unraisable_exception(). catch_threading_exception() is very close to catch_unraisable_exception(). -- ___ Python tracker

[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +14472 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14664 ___ Python tracker ___

[issue37526] Add support.catch_threading_exception()

2019-07-09 Thread STINNER Victor
New submission from STINNER Victor : bpo-1230540 added threading.excepthook() to handle "uncaught exceptions raised by Thread.run()". I propose to add support.catch_threading_exception(): context manager to ease catching these exceptions. Attached PR implements it. -- components: