This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dzhamoytsin
Recipients dzhamoytsin
Date 2021-12-16.10:33:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639650794.38.0.196898311549.issue46096@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-12-16 10:33:14dzhamoytsinsetrecipients: + dzhamoytsin
2021-12-16 10:33:14dzhamoytsinsetmessageid: <1639650794.38.0.196898311549.issue46096@roundup.psfhosted.org>
2021-12-16 10:33:14dzhamoytsinlinkissue46096 messages
2021-12-16 10:33:14dzhamoytsincreate