Issue37526
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2019-07-09 10:26 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 14664 | merged | vstinner, 2019-07-09 10:33 | |
| PR 14666 | merged | miss-islington, 2019-07-09 11:00 | |
| Messages (5) | |||
|---|---|---|---|
| msg347540 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-07-09 10:26 | |
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. |
|||
| msg347543 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-07-09 10:38 | |
See also bpo-36829: Add test.support.catch_unraisable_exception(). catch_threading_exception() is very close to catch_unraisable_exception(). |
|||
| msg347545 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-07-09 11:00 | |
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 |
|||
| msg347552 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-07-09 11:36 | |
New changeset 58f2c7f424fe91ba035918f0f66306af73a37543 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-37526: Add support.catch_threading_exception() (GH-14664) (GH-14666) https://github.com/python/cpython/commit/58f2c7f424fe91ba035918f0f66306af73a37543 |
|||
| msg347556 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-07-09 12:37 | |
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 cycle. I guess so. It's likely than storing an exception creates a ref cycle. Anyway, __exit__() removes attributes. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:17 | admin | set | github: 81707 |
| 2019-07-09 12:37:40 | vstinner | set | status: open -> closed resolution: fixed messages: + msg347556 stage: patch review -> resolved |
| 2019-07-09 11:36:03 | vstinner | set | messages: + msg347552 |
| 2019-07-09 11:00:34 | miss-islington | set | pull_requests: + pull_request14474 |
| 2019-07-09 11:00:27 | vstinner | set | messages: + msg347545 |
| 2019-07-09 10:38:04 | vstinner | set | messages: + msg347543 |
| 2019-07-09 10:33:47 | vstinner | set | keywords:
+ patch stage: patch review pull_requests: + pull_request14472 |
| 2019-07-09 10:33:39 | vstinner | set | versions: + Python 3.8 |
| 2019-07-09 10:26:30 | vstinner | create | |
