-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
bpo-38142: Updated _hashopenssl.c to be PEP 384 compliant #16071
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.
Since EVP is now a heap allocated type, you should now properly refcount the type as well. You can read the details in: https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-the-c-api, search for bpo-35810
Anyways, the TL;DR is that EVP_dealloc should now be:
static void
EVP_dealloc(EVPobject *self)
{
PyTypeObject *tp = Py_TYPE(self);
if (self->lock != NULL)
PyThread_free_lock(self->lock);
EVP_MD_CTX_free(self->ctx);
PyObject_Del(self);
Py_DECREF(tp);
}
945e8e2
to
aa25666
Compare
Thanks! I missed the note. :) |
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.
Perfect! This LGTM now!
Agh I forget I don't have the commit bit here. Let's ping someone else to merge, cc @ericsnowcurrently @DinoV |
Signed-off-by: Christian Heimes <christian@python.org>
The updated type no longer accepts random arguments to __init__. Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
6e95139
to
a4b8323
Compare
@tiran: Please replace |
…H-16248) As mentioned in the bpo ticket, this mistake came up on two reviews: - #16127 (review) - #16071 (review) Would be nice to have it documented in a more permanent place than 3.8's whatsnew entry. https://bugs.python.org/issue38206 Automerge-Triggered-By: @encukou
* Updated _hashopenssl.c to be PEP 384 compliant * Remove refleak test from test_hashlib. The updated type no longer accepts random arguments to __init__.
…ythonGH-16248) As mentioned in the bpo ticket, this mistake came up on two reviews: - python#16127 (review) - python#16071 (review) Would be nice to have it documented in a more permanent place than 3.8's whatsnew entry. https://bugs.python.org/issue38206 Automerge-Triggered-By: @encukou
The _hashlib OpenSSL wrapper extension module is now PEP 384 compliant.
Also remove refleak test from test_hashlib. The updated type no longer accepts random arguments to
__init__
.https://bugs.python.org/issue38142