Title: Nondeterministic string hashing in Python(>3.3) · Issue #52 · spotify/pythonflow · GitHub
Open Graph Title: Nondeterministic string hashing in Python(>3.3) · Issue #52 · spotify/pythonflow
X Title: Nondeterministic string hashing in Python(>3.3) · Issue #52 · spotify/pythonflow
Description: I was running into some weird issues with incorrect caching to file a function applied to a string. This is because python(>3.3) salts its hashing function. (for strings at least) Specifically: > python -c "print(hash('asdf'))" -86902085...
Open Graph Description: I was running into some weird issues with incorrect caching to file a function applied to a string. This is because python(>3.3) salts its hashing function. (for strings at least) Specifically: > p...
X Description: I was running into some weird issues with incorrect caching to file a function applied to a string. This is because python(>3.3) salts its hashing function. (for strings at least) Specifically: ...
Opengraph URL: https://github.com/spotify/pythonflow/issues/52
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Nondeterministic string hashing in Python(\u003e3.3)","articleBody":"I was running into some weird issues with incorrect caching to file a function applied to a string.\r\n\r\nThis is because python(\u003e3.3) salts its hashing function. (for strings at least)\r\nSpecifically:\r\n```\r\n\u003e python -c \"print(hash('asdf'))\"\r\n-8690208562067163084\r\n\u003e python -c \"print(hash('asdf'))\"\r\n-4220296486527231708\r\n```\r\n\r\nThe fix for this is to pass in `PYTHONHASHSEED=1`.\r\nThe 'proper' fix would be to substitute the internal hash function for something more suitable, however I couldn't immediately see the right place to inject that.\r\n\r\n\u003e PYTHONHASHSEED=1 python -c \"print(hash('asdf'))\"\r\n-5132432945605986887\r\n\u003e PYTHONHASHSEED=1 python -c \"print(hash('asdf'))\"\r\n-5132432945605986887","author":{"url":"https://github.com/Cjen1","@type":"Person","name":"Cjen1"},"datePublished":"2023-03-06T14:44:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/52/pythonflow/issues/52"}
| 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:384d65bf-bc6a-73ff-460c-151e25e4c9f4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 813C:2D9FEB:694D7E:9A6F30:6A4E0DE6 |
| html-safe-nonce | 088ab46591bc30208c751829906be5654d4ec1245b43ccd8e8ce0b1afdb6e6bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTNDOjJEOUZFQjo2OTREN0U6OUE2RjMwOjZBNEUwREU2IiwidmlzaXRvcl9pZCI6IjU5NzM5OTMxNzE5NzcxMTMwNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1305cdc1c0919669089748180623e42d9f8426fba5700c461c24b863486386f9 |
| hovercard-subject-tag | issue:1611582438 |
| 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/spotify/pythonflow/52/issue_layout |
| twitter:image | https://opengraph.githubassets.com/213f613625b7bdaf16bb03f3365b0d5b23b204e0fd3d7e3c0c5625a27ed74a25/spotify/pythonflow/issues/52 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/213f613625b7bdaf16bb03f3365b0d5b23b204e0fd3d7e3c0c5625a27ed74a25/spotify/pythonflow/issues/52 |
| og:image:alt | I was running into some weird issues with incorrect caching to file a function applied to a string. This is because python(>3.3) salts its hashing function. (for strings at least) Specifically: > p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Cjen1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/spotify/pythonflow git https://github.com/spotify/pythonflow.git |
| octolytics-dimension-user_id | 251374 |
| octolytics-dimension-user_login | spotify |
| octolytics-dimension-repository_id | 102513092 |
| octolytics-dimension-repository_nwo | spotify/pythonflow |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 102513092 |
| octolytics-dimension-repository_network_root_nwo | spotify/pythonflow |
| 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 | 51470c353b8a1f52a88d3e3cc2014b17ab8cc1ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width