| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…public This partially reverts python#107026.
|
I would prefer to make them public if they are useful. |
Sorry, something went wrong.
@vstinner, are you about documenting these macroses somewhere (I propose https://docs.python.org/3/library/sys.html#sys.hash_info, where we could mention them in descriptions for different fields) AND about renaming them too (add PyUnstable_ aliases)? |
Sorry, something went wrong.
There was a problem hiding this comment.
Please don't document private APIs.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
If you want to document these constants, make them public. |
Sorry, something went wrong.
|
It looks like numpy uses _Py_HashDouble to hash numpy scalars. If we're going to expose these symbols again, is there any appetite for exposing the functions used by them in the unstable API? If not it looks like it should be straightforward to vendor the code assuming there aren't any hidden issues for making the hash values of numpy scalars possibly differ from python scalars in the future. |
Sorry, something went wrong.
Ok, I've added PyUnstable prefixes. If that's ok, I'll add a news entry. The other option is to revert to 0ce377a. I don't think we could just remove underscores, given the _PyHASH_NAN example. I have made the requested changes; please review again BTW, maybe we shouldn't export _PyHASH_BITS. This parameter is not available in sys.hash_info and examples for hashing in the docs show how to avoid using one. I'll try to patch gmpy2 to remove it's usage (seems to be trivial for mpq, but may be less efficient for mpfr). I think same could be done for the Sage.
|
Sorry, something went wrong.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
|
I didn't expect the Spanish Inquisition |
Sorry, something went wrong.
Sorry, something went wrong.
Hmm, no, it seems we really want this, e.g.: gmpy2/gmpy2#452 (see first removed commit). Then maybe we should expose this in sys.hash_info struct too? |
Sorry, something went wrong.
There was a problem hiding this comment.
I'm working on PR #112095 which adds an "infrastructure" to test the PyHash API. I suggest waiting until this PR is merged before considering exposing these constants to the public C API.
Sorry, something went wrong.
…etY.rst Co-authored-by: Victor Stinner <vstinner@python.org>
Was rendered: "See also the PyTypeObject.tp_hash member and Hashing of numeric types for more details about hashing of numeric types."
|
Perhaps, I should use Py_HASH_* naming convention? (Given #112449) |
Sorry, something went wrong.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Sorry, something went wrong.
Co-authored-by: Victor Stinner <vstinner@python.org>
There was a problem hiding this comment.
LGTM, I just suggest to add a comment.
@mdickinson: Would you mind to double check this PR?
Sorry, something went wrong.
There was a problem hiding this comment.
Looks fine to me.
Sorry, something went wrong.
|
Thanks to all for review and patience. |
Sorry, something went wrong.
…python#111418) Co-authored-by: Victor Stinner <vstinner@python.org>
…python#111418) Co-authored-by: Victor Stinner <vstinner@python.org>
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.