New submission from Dmitry <dmitry_zhamoyt...@mentor.com>:
We use the embedded Python in a multiscript environment. For example, VBS can execute Python code and vice versa. For that purpose we use a global context which is common for all running scripts (Python, VBS etc.) and control access to variables in that context by PyObject interface. But we faced with an issue: 1) Setting/deleting global variables in local scope are done outside of our control (without using PyObject interface). 2) A debugger (LOAD_NAME tag) does not see global variables in local scope. We would like to fix that issue by adding a check for exact PyDict (PyDict_CheckExact) in STORE_GLOBAL, DELETE_GLOBAL and LOAD_NAME tags in ceval.c. If a global dictionary is redefined then use PyObject interface instead of direct PyDict one. ---------- components: Interpreter Core hgrepos: 412 messages: 408684 nosy: dzhamoytsin priority: normal severity: normal status: open title: Support PyObject interface for global variables in local scope and debugger type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46096> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com