bpo-38142: Updated _hashopenssl.c to be PEP 384 compliant#16071
bpo-38142: Updated _hashopenssl.c to be PEP 384 compliant#16071tiran merged 4 commits intopython:masterfrom
Conversation
eduardo-elizondo
left a comment
There was a problem hiding this comment.
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. :) |
eduardo-elizondo
left a comment
There was a problem hiding this comment.
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 <[email protected]>
The updated type no longer accepts random arguments to __init__. Signed-off-by: Christian Heimes <[email protected]>
Signed-off-by: Christian Heimes <[email protected]>
Signed-off-by: Christian Heimes <[email protected]>
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