Title: Deprecate Py_HASH_EXTERNAL as it cannot be used for `--with-hash-algorithm` · Issue #141226 · python/cpython · GitHub
Open Graph Title: Deprecate Py_HASH_EXTERNAL as it cannot be used for `--with-hash-algorithm` · Issue #141226 · python/cpython
X Title: Deprecate Py_HASH_EXTERNAL as it cannot be used for `--with-hash-algorithm` · Issue #141226 · python/cpython
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 SipHa...
Open Graph 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 ...
X 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 ...
Opengraph URL: https://github.com/python/cpython/issues/141226
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deprecate Py_HASH_EXTERNAL as it cannot be used for `--with-hash-algorithm`","articleBody":"# Bug report\n\n### Bug description:\n\nIn 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.\n\nUnfortunately, 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).\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-141245\n* gh-141287\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/picnixz","@type":"Person","name":"picnixz"},"datePublished":"2025-11-08T09:20:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/141226/cpython/issues/141226"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:25e2c0af-e28b-48f7-a3a9-e4f8397c82f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ACF6:EA765:408ECA:59B1C4:696A4FA8 |
| html-safe-nonce | 4e264149bdf2015cabf4baf6d4681381573d761b10c02e4a5202d56ad92fd1a8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0Y2OkVBNzY1OjQwOEVDQTo1OUIxQzQ6Njk2QTRGQTgiLCJ2aXNpdG9yX2lkIjoiMjEyMDEyMjE4Njk0NzI1MjEzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a10263c200b9baea1d6dce24cf39a6a48851316442589556b9c9a4184723a2ad |
| hovercard-subject-tag | issue:3603218193 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/141226/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7cf659dd99b53ed77532ab3ae54364c7e47631935404845ac7b5ea2a82c4bd59/python/cpython/issues/141226 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7cf659dd99b53ed77532ab3ae54364c7e47631935404845ac7b5ea2a82c4bd59/python/cpython/issues/141226 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | picnixz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width