PEP 669: Clarify and restrict interaction with PEP 523 (#2760)

This commit is contained in:
Mark Shannon 2022-08-12 10:14:56 +01:00 committed by GitHub
parent 9819ca468e
commit 39b78da33b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -288,13 +288,16 @@ Backwards Compatibility
This PEP is mostly backwards compatible.
This PEP is incompatible with :pep:`523` as the behavior would be undefined,
as we have no control over the behavior of :pep:`523` plugins.
since the VM has no control over the behavior of :pep:`523` plugins.
Thus, if :pep:`523` is in use, then calling ``sys.monitoring.set_events()`` or
``sys.monitoring.set_local_events()`` will raise an exception.
Thus, if ``_PyInterpreterState_SetEvalFrameFunc()`` has been called and has
changed the frame evaluation function, then calling
``sys.monitoring.set_events()``, ``sys.monitoring.set_local_events()``, or
``sys.monitoring.insert_marker`` will raise an exception.
Likewise, if ``sys.monitoring.set_events()`` or
``sys.monitoring.set_local_events()`` has been called, then using :pep:`523`
Likewise, if ``sys.monitoring.set_events()``,
``sys.monitoring.set_local_events()``, or ``sys.monitoring.insert_marker``
has been called, then calling ``_PyInterpreterState_SetEvalFrameFunc()``
will raise an exception.
``sys.settrace`` and ``sys.setprofile`` will act as if they were tools 6 and 7