gh-111389: expose _PyHASH_INF/BITS/MODULUS/IMAG macros as public#111418
gh-111389: expose _PyHASH_INF/BITS/MODULUS/IMAG macros as public#111418vstinner merged 18 commits intopython:mainfrom
Conversation
…public This partially reverts python#107026.
1edec34 to
0ce377a
Compare
|
I would prefer to make them public if they are useful. |
@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)? |
1f9f2fc to
2c6002f
Compare
vstinner
left a comment
There was a problem hiding this comment.
Please don't document private APIs.
|
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 |
|
If you want to document these constants, make them public. |
|
It looks like numpy uses |
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 I have made the requested changes; please review again BTW, maybe we shouldn't export
|
|
I have made the requested changes; please review again |
|
I didn't expect the Spanish Inquisition |
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? |
Misc/NEWS.d/next/C API/2023-11-15-09-24-51.gh-issue-111418.FYYetY.rst
Outdated
Show resolved
Hide resolved
…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 |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner
left a comment
There was a problem hiding this comment.
LGTM, I just suggest to add a comment.
@mdickinson: Would you mind to double check this PR?
|
Merged, thank you @skirpichev. |
|
Thanks to all for review and patience. |
…python#111418) Co-authored-by: Victor Stinner <vstinner@python.org>
…python#111418) Co-authored-by: Victor Stinner <vstinner@python.org>
Uh oh!
There was an error while loading. Please reload this page.