gh-88863: clear ref cycles to resolve leak when asyncio.open_connection raises#95739
Conversation
kumaraditya303
left a comment
There was a problem hiding this comment.
A rebase is required otherwise LGTM
Break reference cycles to resolve memory leak, by removing local exception and future instances from the frame
a94e8c1 to
b5bf956
Compare
|
Thank you for the review @kumaraditya303, and sorry for my late response. |
gvanrossum
left a comment
There was a problem hiding this comment.
LGTM, I will fix the grammar in the NEWS file and merge. Thank you for your patch!
Misc/NEWS.d/next/Library/2022-08-06-12-18-07.gh-issue-88863.NnqsuJ.rst
Outdated
Show resolved
Hide resolved
|
Thanks @frostbyte134 for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
|
Sorry, @frostbyte134 and @gvanrossum, I could not cleanly backport this to |
|
Sorry @frostbyte134 and @gvanrossum, I had trouble checking out the |
|
If you want to try manually backporting these, please go ahead. |
…open_connection raises (pythonGH-95739) Break reference cycles to resolve memory leak, by removing local exception and future instances from the frame. (cherry picked from commit 995f617) Co-authored-by: Dong Uk, Kang <nailbrainz@gmail.com>
…open_connection raises (pythonGH-95739) Break reference cycles to resolve memory leak, by removing local exception and future instances from the frame. (cherry picked from commit 995f617) Co-authored-by: Dong Uk, Kang <nailbrainz@gmail.com>
|
GH-99721 is a backport of this pull request to the 3.11 branch. |
|
GH-99722 is a backport of this pull request to the 3.10 branch. |
|
@gvanrossum I just created 2 manual backport PRs to 3.10 and 3.11. Thank you for the review and fix! |
Break reference cycles to resolve #88863 by removing local exception and future (which has exception as its member var) instances from the frame. I believe those changes will not have bad effects, as they are just removing local variables which are not used anymore.
Checked in Windows 10/Mac Monterey/Centos 7.9