msg315592 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-04-22 08:56 |
The proposed PR adds missed checks for errors and PyErr_Clear() calls in PyImport_Cleanup(). It may be worth to use PyErr_WriteUnraisable() in place of PyErr_Clear() (newly added and existing) in most cases. But this can add an unexpected noise, and I don't wont to do this at this stage of 3.7. It could be done in 3.8 though, and backported to 3.7 later. I'm not sure that PyImport_Cleanup() works properly if sys.modules is not a dict. At this stage a custom mapping will likely be broken when most of modules are destroyed. |
|
|
msg315751 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-04-25 17:58 |
New changeset e9d9494d6b2a5e0c2d48d22c7f0d5e95504b4f7e by Serhiy Storchaka in branch 'master': bpo-33330: Improve error handling in PyImport_Cleanup(). (GH-6564) https://github.com/python/cpython/commit/e9d9494d6b2a5e0c2d48d22c7f0d5e95504b4f7e |
|
|
msg315756 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-04-25 18:32 |
New changeset 291c9d4f74f3c7c57ae18e1aca617206795a090d by Miss Islington (bot) in branch '3.7': bpo-33330: Improve error handling in PyImport_Cleanup(). (GH-6564) https://github.com/python/cpython/commit/291c9d4f74f3c7c57ae18e1aca617206795a090d |
|
|
msg315757 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-04-25 18:56 |
PR 6606 replaces PyErr_Clear() with PyErr_WriteUnraisable(). This may add an unexpected noise at shutdown' but on other hand, this may be a helpful information in the case if something wrong happen. It doesn't produce additional output when run all tests, this means that that all is successful. I wonder in which circumstance that output will be occurred. |
|
|
msg315766 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-04-26 00:27 |
New changeset b16681fb1e63f45361d1d68333d6dbdd4bf5435d by Serhiy Storchaka in branch '3.6': [3.6] bpo-33330: Improve error handling in PyImport_Cleanup(). (GH-6564). (GH-6604) https://github.com/python/cpython/commit/b16681fb1e63f45361d1d68333d6dbdd4bf5435d |
|
|
msg315767 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-04-26 00:28 |
New changeset 55299fffe328c3d2dfc222a22116b7e53bf2e962 by Serhiy Storchaka in branch '2.7': [2.7] bpo-33330: Improve error handling in PyImport_Cleanup(). (GH-6564). (GH-6605) https://github.com/python/cpython/commit/55299fffe328c3d2dfc222a22116b7e53bf2e962 |
|
|
msg315915 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-04-29 19:16 |
New changeset c1a6832f50b36ffec299e6e6038535904e2b158d by Serhiy Storchaka in branch 'master': bpo-33330: Write exceptions occurred in PyImport_Cleanup() to stderr. (GH-6606) https://github.com/python/cpython/commit/c1a6832f50b36ffec299e6e6038535904e2b158d |
|
|
msg317367 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-05-23 09:34 |
I reopen the issue because I created the PR 7068 to propose further checks (in debug mode). |
|
|
msg317381 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-05-23 10:36 |
See also about the bug in subinterpreters exposed when add yet one PyErr_WriteUnraisable() in PyImport_Cleanup() (it was not added because of this). |
|
|