STINNER Victor <vstin...@python.org> added the comment:
> Python/_warnings.c I'm not sure if it's a good idea to convert the _warnings module to multi-phase init, since it uses a state stored in the interpreter: /* Given a module object, get its per-module state. */ static WarningsState * warnings_get_state(void) { PyInterpreterState *interp = _PyInterpreterState_GET(); if (interp == NULL) { PyErr_SetString(PyExc_RuntimeError, "warnings_get_state: could not identify " "current interpreter"); return NULL; } return &interp->warnings; } For example, two _warnings instance would share the _warnings.filters list. Maybe it's ok, I don't know. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue1635741> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com