-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-86493: Fix possible leaks in some modules initialization #106768
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-86493: Fix possible leaks in some modules initialization #106768
Conversation
Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
1bec79f
to
8703a44
Compare
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry @serhiy-storchaka, I had trouble checking out the |
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
Nice fix. I like when removing characters fix bugs :-D About the backport: Python 3.11 and 3.12 don't have PyModule_Add(), so you cannot backport these fixes, no? While it's tempting, I don't think that it's worth it. |
…ion (pythonGH-106768) Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.. (cherry picked from commit 3e65bae) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-106855 is a backport of this pull request to the 3.12 branch. |
…ialization (pythonGH-106768) (pythonGH-106855) Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time. (cherry picked from commit 3e65bae). (cherry picked from commit a423ddb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
Use new
private functionpublic function_PyModule_AddNew()
PyModule_Add()
instead ofPyModule_AddObject()
.