Skip to content

Allow mmh3 5.x (widen to >=4.1.0,<6.0.0) - #105

Open
MiguelAmorimMP wants to merge 1 commit into
pinecone-io:mainfrom
MiguelAmorimMP:allow-mmh3-5
Open

Allow mmh3 5.x (widen to >=4.1.0,<6.0.0)#105
MiguelAmorimMP wants to merge 1 commit into
pinecone-io:mainfrom
MiguelAmorimMP:allow-mmh3-5

Conversation

@MiguelAmorimMP

@MiguelAmorimMP MiguelAmorimMP commented Jul 28, 2026

Copy link
Copy Markdown

What

Widens the mmh3 constraint 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

  • The only mmh3 call in the package is mmh3.hash(token, signed=False) in pinecone_text/sparse/bm25_encoder.py.
  • MurmurHash3 output is algorithm-fixed: I verified 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.toml relaxes the mmh3 pin from ^4.1.0 (effectively <5.0.0) to >=4.1.0,<6.0.0, so installs can resolve mmh3 5.x alongside pinecone-text while 4.x remains allowed.

No library code changes. BM25 sparse encoding still uses mmh3.hash(token, signed=False) in bm25_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant