-
-
Notifications
You must be signed in to change notification settings - Fork 357
don't use f_locals for foreign async generators #3112
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
Merged
graingert
merged 20 commits into
python-trio:main
from
graingert:dont-use-f_locals-for-agen-finalization
Nov 21, 2024
Merged
Changes from 8 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
be11787
add test for gc in foreign async generators
graingert 0ec9f8a
use a strong set of ids for foriegn async gens
graingert 1504187
Update src/trio/_core/_asyncgens.py
graingert 64ce3c4
add newsfragment
graingert f435d35
Update newsfragments/3112.bugfix.rst
graingert b3cdced
move name_asyncgen later than self.foreign.remove
graingert 1eae0c5
remove 3.6 compat code
graingert a3c1816
move sniffio import to top
graingert fc1f5bb
asyncio.run introduced some breakage
graingert c4010fc
Merge branch 'main' of github.com:python-trio/trio into dont-use-f_lo…
graingert 0ebad56
Merge branch 'main' into dont-use-f_locals-for-agen-finalization
graingert 28957e0
ki protect asyncgen finalizers, because it's critical to run
graingert 9f1823a
try asyncio.run again
graingert d2f9c3c
Revert "try asyncio.run again"
graingert b21e6ef
well that just got worse
graingert 4807c3b
Merge branch 'main' of github.com:python-trio/trio into dont-use-f_lo…
graingert 2befccc
be surgicial in KI-unprotection
graingert 933b1c3
make f positional only
graingert 8fdaaf5
restore comment
graingert ca6e01c
Merge branch 'main' into dont-use-f_locals-for-agen-finalization
graingert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Rework foreign async generator finalization to track async generator | ||
ids rather than mutating ``ag_frame.f_locals``. This fixes an issue | ||
with the previous implementation: locals' lifetimes will no longer be | ||
extended by materialization in the ``ag_frame.f_locals`` dictionary that | ||
the previous finalization dispatcher logic needed to access to do its work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.