bpo-44252: Correctly implement gc support for SSLError objects#26439
Merged
pablogsal merged 1 commit intopython:mainfrom May 28, 2021
Merged
bpo-44252: Correctly implement gc support for SSLError objects#26439pablogsal merged 1 commit intopython:mainfrom
pablogsal merged 1 commit intopython:mainfrom
Conversation
vstinner
approved these changes
May 28, 2021
Member
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I'm not sure that the unit test is useful. If you want to keep it, maybe add a comment.
Using the following change, I can reproduce https://bugs.python.org/issue44252
diff --git a/Lib/site.py b/Lib/site.py
index 939893eb5e..c02987e220 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -672,3 +672,5 @@ def exists(path):
if __name__ == '__main__':
_script()
+
+import gc; gc.set_threshold(5)
Without this PR:
$ ./python -m test test_ssl -m test_ssl_cert_verify_error -v
...
Fatal Python error: Segmentation fault
Current thread 0x00007f25b0858640 (most recent call first):
File "/home/vstinner/python/3.10/Lib/traceback.py", line 132 in format_exception
File "/home/vstinner/python/3.10/Lib/test/test_ssl.py", line 262 in handle_error
File "/home/vstinner/python/3.10/Lib/test/test_ssl.py", line 2401 in wrap_conn
...
With this PR:
$ ./python -m test test_ssl -v
(...)
Tests result: SUCCESS
Contributor
|
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 28, 2021
…nGH-26439) (cherry picked from commit 8b4312b) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
GH-26441 is a backport of this pull request to the 3.10 branch. |
pablogsal
added a commit
that referenced
this pull request
May 28, 2021
Contributor
|
Thanks for fixing this, Pablo! Sorry for introducing the regression. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://bugs.python.org/issue44252