gh-106320: Move private _PyHash API to the internal C API#107026
Merged
vstinner merged 1 commit intopython:mainfrom Jul 22, 2023
Merged
gh-106320: Move private _PyHash API to the internal C API#107026vstinner merged 1 commit intopython:mainfrom
vstinner merged 1 commit intopython:mainfrom
Conversation
* No longer export most private _PyHash symbols, only export the ones which are needed by shared extensions. * Modules/_xxtestfuzz/fuzzer.c now uses the internal C API.
illia-v
added a commit
to illia-v/oss-fuzz
that referenced
this pull request
Jul 28, 2023
`Modules/_xxtestfuzz/fuzzer.c` in CPython started using private API in python/cpython@89f9875#diff-a22ac7579f23068e0c6bcacf1086ee962fdf8e68725cf0510b42d0a389cf1efd. This made fuzzing builds fail https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60831. Including needed header files fixes the error.
jonathanmetzman
pushed a commit
to google/oss-fuzz
that referenced
this pull request
Jul 31, 2023
`Modules/_xxtestfuzz/fuzzer.c` in CPython started using private API in python/cpython@89f9875#diff-a22ac7579f23068e0c6bcacf1086ee962fdf8e68725cf0510b42d0a389cf1efd. This made fuzzing builds fail https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60831. Including needed header files fixes the error.
Member
|
Again, as in #108604, the gmpy2 uses some parts of this API, e.g. to hash mpz like int. Meanwhile I did gmpy2/gmpy2#441 to workaround removed API. @vstinner, what we could do instead? |
Member
Author
Would you mind to open a new issue, give the exhaustive list of functions that you need, and which API do you expect? |
skirpichev
added a commit
to skirpichev/cpython
that referenced
this pull request
Oct 28, 2023
…public This partially reverts python#107026.
dmrlawson
pushed a commit
to dmrlawson/capnpy
that referenced
this pull request
Jun 9, 2025
_Py_HashBytes was hidden in 3.13 (python/cpython#107026). > C assumes that any function with an "implicit declaration" returns an int, which'll be smaller than a Py_hash_t, hence the different results. (https://groups.google.com/g/cython-users/c/YQkU8oc8oSM/m/nVJ_IX8KAgAJ)
dmrlawson
pushed a commit
to dmrlawson/capnpy
that referenced
this pull request
Jun 9, 2025
_Py_HashBytes was hidden in 3.13 (python/cpython#107026). > C assumes that any function with an "implicit declaration" returns an int, which'll be smaller than a Py_hash_t, hence the different results. (https://groups.google.com/g/cython-users/c/YQkU8oc8oSM/m/nVJ_IX8KAgAJ)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.