New submission from Eric Snow <ericsnowcurren...@gmail.com>:
In Python/import.c there are various situations in which an error state related to frozen modules might result and even lead to an exception. In gh-28633 we consolidated these cases into a new "frozen_status" enum and added "set_frozen_error()" to set a consistent exception based on a status. There are several deficiencies to address at this point: * the conditions for the statuses are unclear [1][2] * the error messages could be more helpful [3] * maybe use a different error message for FROZEN_BAD_NAME (and perhaps FROZEN_DISABLED), rather than combining with FROZEN_NOT_FOUND [1] https://github.com/python/cpython/pull/28633#discussion_r720503665 [2] https://github.com/python/cpython/pull/28633#discussion_r720504275 [3] https://github.com/python/cpython/pull/28633#discussion_r720987412 ---------- components: Interpreter Core messages: 403246 nosy: barry, brett.cannon, eric.snow priority: normal severity: normal stage: needs patch status: open title: Improve errors related to frozen modules. type: behavior versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45379> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com