-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
gh-116946: fully implement GC protocol for _hashlib
objects
#138289
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
Conversation
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 again!
🤖 New build scheduled with the buildbot fleet by @gpshead for commit 23c4d91 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F138289%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, @picnixz, I could not cleanly backport this to
|
…jects (pythonGH-138289) (cherry picked from commit 6f1dd95) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
GH-138324 is a backport of this pull request to the 3.14 branch. |
…jects (pythonGH-138289) (cherry picked from commit 6f1dd95) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
GH-138326 is a backport of this pull request to the 3.13 branch. |
…jects (pythonGH-138289) (cherry picked from commit 6f1dd95) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…jects (pythonGH-138289) (cherry picked from commit 6f1dd95) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…jects (pythonGH-138289) (cherry picked from commit 6f1dd95) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@kumaraditya303 If the type is both immutable and disallows instantiation BUT can be inherited, should I still implement the GC protocol? If so, I need to only keep half of the PR. Otherwise I can fully revert it. |
No, the subclass would implement the GC protocol if it needs to, it is not needed for base type in this case as it is immutable and objects are empty. |
…bjects (python#138289)" This reverts commit 6f1dd95.
…hlib` objects (pythonGH-138289) (python#138326)" This reverts commit 21b5932.
…H-138322, GH-138323, GH-138326) (#138337) * Revert "[3.13] gh-116946: fully implement GC protocol for `bz2` objects (GH-138266) (#138322)" This reverts commit 90036f5. * Revert "[3.13] gh-116946: fully implement GC protocol for `lzma` objects (GH-138288) (#138323)" This reverts commit 828682d. * Revert "[3.13] gh-116946: fully implement GC protocol for `_hashlib` objects (GH-138289) (#138326)" This reverts commit 21b5932.
…, GH-138288, GH-138289) (#138338) * Revert "gh-116946: fully implement GC protocol for `bz2` objects (#138266)" This reverts commit 9be91f6. * Revert "gh-116946: fully implement GC protocol for `lzma` objects (#138288)" This reverts commit 3ea16f9. * Revert "gh-116946: fully implement GC protocol for `_hashlib` objects (#138289)" This reverts commit 6f1dd95.
I noticed that
HASHXOF
didn't explicitly specify its deallocation function because HASHXOF is inherting HASH (it's constructed usingPyType_FromSpecWithBases
).