Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-128552: fix refcycles in eager task creation#128553
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
gh-128552: fix refcycles in eager task creation #128553
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…5-01-06-18-41-08.gh-issue-128552.fV-f8j.rst
Misc/NEWS.d/next/Library/2025-01-06-18-41-08.gh-issue-128552.fV-f8j.rst Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kumaraditya303 commented Jan 7, 2025
if possible can you add a test which uses weakref to check for refcycle |
Uh oh!
There was an error while loading. Please reload this page.
| fromtest.test_asyncio.utilsimportawait_without_task | ||
| # To prevent a warning "test altered the execution environment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this isn't needed as you have changed it to use asyncio.EventLoop but let's keep it for now, it is easy to make a mistake on altering policy and is a pain to fix in CI if it happens without this.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| self.assertIsNone(task_wr()) | ||
| self.assertIsInstance(exc, _Done) | ||
| self.assertListEqual(gc.get_referrers(exc), no_other_refs()) |
kumaraditya303Jan 7, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was later changed that coro doesn't hold ref to locals, no_other_refs should not be necessary here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah its not merged yet #125640
kumaraditya303 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
61b9811 into python:mainUh oh!
There was an error while loading. Please reload this page.
Thanks @graingert for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @graingert and @kumaraditya303, I could not cleanly backport this to |
Thanks @graingert for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @graingert and @kumaraditya303, I could not cleanly backport this to |
GH-128585 is a backport of this pull request to the 3.13 branch. |
(cherry picked from commit 61b9811)
GH-128586 is a backport of this pull request to the 3.12 branch. |
GH-128586 is a backport of this pull request to the 3.12 branch. |
Uh oh!
There was an error while loading. Please reload this page.