gh-108342: Break ref cycle in SSLSocket._create() exc#108344
gh-108342: Break ref cycle in SSLSocket._create() exc#108344gpshead merged 2 commits intopython:mainfrom
Conversation
Break explicitly a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle.
|
Without this change, the following test fails: With this PR, the test pass. |
gpshead
left a comment
There was a problem hiding this comment.
Thanks! I missed this one during testing (I think it doesn't always show up? due to gc cycle check timing?)
|
GH-108348 is a backport of this pull request to the 3.12 branch. |
…-108344) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of pythonGH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-108349 is a backport of this pull request to the 3.11 branch. |
…-108344) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of pythonGH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-108350 is a backport of this pull request to the 3.10 branch. |
|
GH-108351 is a backport of this pull request to the 3.9 branch. |
…-108344) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of pythonGH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-108352 is a backport of this pull request to the 3.8 branch. |
…-108344) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of pythonGH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
…-108344) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of pythonGH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
…) (#108348) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of GH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
…) (#108349) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of GH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
…) (#108350) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of GH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
… (#108351) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of GH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
… (#108352) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of GH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
Sadly, this fix was not enough :-( I'm investigating the issue to try to break reference cycles explicitly at more places. The issue is easy to reproduce on Windows. |
I wrote PR #108370 to fix the issue in more cases. |
…thonGH-108344) (python#108351) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of pythonGH-108310. (cherry picked from commit 64f9935) Co-authored-by: Victor Stinner <vstinner@python.org>
Break explicitly a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle.