-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Open
Labels
buildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement
Description
Bug report
Bug description:
In PEP-456, we introduced the notion of interchangeable hash functions for strings, bytes and memoryviews. Historically, Python used FNV as its hash algorithm, switched to SipHash2-4 in 3.4 before making SipHash1-3 the default in 3.11. It is however possible for embedders to implement their own hashing algorithms but this requires Python to be configured with --with-hash-algorithm=external and linking Python with the appropriate additional library.
Unfortunately, it's not possible to choose external and the only workaround would be to pass -DPy_HASH_ALGORITHM 0 but this is neither documented nor tested (it may not even work if the macro is still defined afterwards).
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
buildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement