capi-workgroup / decisions

Discussion and voting on specific issues
5 stars 1 forks source link

Add Py_HashDouble() function #2

Closed vstinner closed 5 months ago

vstinner commented 9 months ago

UPDATE: I updated the API documation to address @zooba's suggestion (make the API more generic, be less specific about NaN case).

Voters:

Since I proposed this API and I'm part of the C API Working Group, I will not vote on this decision.

gvanrossum commented 8 months ago

Now, how can we take a decision to move on?

My first choice is to keep the existing private API and close this issue. My second choice is to rename the existing API to remove the leading underscore without semantic changes (i.e., API A).

vstinner commented 8 months ago

Multiple APIs were discussed in the same issue and it's uneasy for me to follow which API is being referred to, so I created a new issue to add a new Py_hash_t Py_HashDouble(double, PyObject *obj) function: https://github.com/capi-workgroup/decisions/issues/10

pitrou commented 7 months ago

Similarly to this, it would be nice to expose a public Py_hash_t Py_HashBytes(const void*, Py_ssize_t) function. This is required to make buffer-like objects hashable in a way that's consistent with Python's bytes and memoryview objects.

vstinner commented 7 months ago

Similarly to this, it would be nice to expose a public Py_hash_t Py_HashBytes(const void*, Py_ssize_t) function.

I suggest to open a new issue for this.

vstinner commented 5 months ago

Apparently, the C API Working Group failed to take a decision on this API.

On January 31st, @gvanrossum wrote on the companion issue #10:

I'm taking an executive decision and closing this issue for lack of progress.

So I also close this issue. numpy will have to continue using the private _Py_HashDouble() function for now.