Allow mmh3 5.x (widen to >=4.1.0,<6.0.0) - #105
Open
MiguelAmorimMP wants to merge 1 commit into
Open
Conversation
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.
What
Widens the
mmh3constraint from^4.1.0(which caps at<5.0.0) to>=4.1.0,<6.0.0, so projects depending on pinecone-text can adopt mmh3 5.x. mmh3 4.x remains fully supported — nothing is dropped.Why
mmh3 5.x has been the current major since late 2024, and this package's caret pin is (in our dependency tree at least) the only thing holding downstream projects on 4.x — pip resolution fails outright for
pinecone-text==0.11.0+mmh3>=5. Same situation as the mmh3 3→4 transition, which was resolved by widening the range (#76).Safety
mmh3.hash(token, signed=False)inpinecone_text/sparse/bm25_encoder.py.mmh3.hash(t, signed=False)returns bit-identical values on 4.1.0 and 5.2.1 for ASCII and non-ASCII tokens — so existing BM25 sparse indexes are unaffected by the wider range.tests/unit/test_bm25.py+tests/unit/test_bm25_tokenizer.py: 21 passed with mmh3 5.2.1 installed (Python 3.12).The 5.x line is API/packaging modernisation (new buffer-protocol APIs, wheels for newer CPython); the
hash()signature used here is unchanged.Note
Low Risk
Only the Poetry dependency constraint changes; runtime hashing behavior is unchanged and mmh3 4.x stays supported.
Overview
Dependency-only change:
pyproject.tomlrelaxes themmh3pin from^4.1.0(effectively<5.0.0) to>=4.1.0,<6.0.0, so installs can resolvemmh35.x alongsidepinecone-textwhile 4.x remains allowed.No library code changes. BM25 sparse encoding still uses
mmh3.hash(token, signed=False)inbm25_encoder.py; widening the declared range does not alter that call site.Reviewed by Cursor Bugbot for commit 6613510. Bugbot is set up for automated code reviews on this repo. Configure here.