gh-130931: Add PyFrame_SetBack() function by vstinner · Pull Request #131252 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Closed
Closed
Conversation
Member
Add tests on PyFrame_GetBack() and PyFrame_SetBack().
📚 Documentation preview 📚: https://cpython-previews--131252.org.readthedocs.build/
Add tests on PyFrame_GetBack() and PyFrame_SetBack().
vstinner
requested a review
from markshannon
as a code owner
bedevere-app
Bot
added
the
awaiting core review
label
bedevere-app
Bot
mentioned this pull request
vstinner
commented
Mar 18, 2025
vstinner commented
Member Author
The coroutine support then needs to inject frames into the current stack. For this, we currently read and write f_back:
https://github.com/cython/cython/blob/f193ba860b94a7139cffd8b0d11b7ef977aa10d3/Cython/Utility/Coroutine.c#L784-L831
https://github.com/cython/cython/blob/f193ba860b94a7139cffd8b0d11b7ef977aa10d3/Cython/Utility/Coroutine.c#L870-L897
@da-woods: Would this function PyFrame_SetBack() be useful to Cython?
vstinner
commented
Mar 19, 2025
vstinner commented
Member Author
cc @markshannon
da-woods
commented
Mar 19, 2025
da-woods commented
Contributor
It'd work for us for our coroutine usage, but from what Mark said, it sounds like there might be issues exposing it more generally.
Member Author
@markshannon is against this API: #130931 (comment). So I prefer to close my PR.
vstinner
closed this
vstinner
deleted the
frame_setback
branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment