-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
GH-108390: Prevent non-local events being set with sys.monitoring.set_local_events()
#108420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sys.monitoring.set_local_events()
sys.monitoring.set_local_events()
Also fixes #108470 |
Misc/NEWS.d/next/Core and Builtins/2023-08-13-17-18-22.gh-issue-108390.TkBccC.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Radislav Chugunov <[email protected]>
Co-authored-by: Radislav Chugunov <[email protected]>
Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @markshannon, I could not cleanly backport this to |
…ing.set_local_events()` (pythonGH-108420)
…ing.set_local_events()` (pythonGH-108420)
|
…ing.set_local_events()` (pythonGH-108420)
GH-108899 is a backport of this pull request to the 3.12 branch. |
PEP 669 refers to "local events" and implies strongly, if not explicitly stated, that only local events can be set locally.
But, the implementation allows non-local events, like
RAISE
, to be set locally.This PR fixes that, which allows the crash reported in #108390 to be fixed as well.
Although a relatively large PR, as it will need backporting, it is really just splitting
_Py_Monitors
into_Py_LocalMonitors
and_Py_GlobalMonitors
and fixing the resulting compiler errors and warnings.