Nick Coghlan <ncogh...@gmail.com> added the comment: I added the new test case, and found to my surprise that it didn't fail, even in debug mode (where there aren't any default filters).
The point I had missed was that even though warnoptions can be NULL in CoreConfig, _Py_MainInterpreterConfig_Read ensures that it's never NULL for the main interpreter config (which is what _PySys_EndInit reads), which means that neither we nor any embedding application can currently trigger the code path in get_warnoptions() that lazily creates the warnings list without adding the reference back into the config settings. We'll need to fix that before we make the new configuration API public, but for now I'm just going to note it in the source code as a "PEP432 TODO". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33042> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com