Repository navigation
chore: lift numpy cap to <3.0.0 in presidio-analyzer - #2330
Open
developer-rpai wants to merge 1 commit into
Open
developer-rpai wants to merge 1 commit into
developer-rpai wants to merge 1 commit into
Conversation
The numpy<2.5.0 pin was a CI workaround from data-privacy-stack#2090/data-privacy-stack#2092 for Poetry installing numpy 2.4.x and 2.5.x side by side, which crashed spaCy's import chain. CI moved to uv in data-privacy-stack#2152, so the cause is gone. Relax the bound back to <3.0.0 as in data-privacy-stack#2091 and regenerate uv.lock (numpy 2.5.3 for Python >= 3.12). Verified the analyzer test suite passes with numpy 2.5.3. Fixes data-privacy-stack#2329
This branch has not been deployed
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.
Fixes #2329
What
Relaxes the
numpyupper bound inpresidio-analyzerfrom<2.5.0back to<3.0.0(as in #2091) and regeneratesuv.lock.Why
The
<2.5.0pin was a CI workaround from #2090/#2092: Poetry installed numpy 2.4.x and 2.5.x side by side, and numpy 2.5.0'smtrandC extension failed to initialize inside spaCy's import chain (AttributeError: 'ModuleSpec' object has no attribute 'doc'). Since #2152 moved CI and images to uv, that resolver behavior is gone, so the pin no longer has a cause. presidio-analyzer itself does not import numpy; spaCy only requiresnumpy>=1.19.0.Verification
uv lockresolves the full tree cleanly with the relaxed bound; the lock now pins numpy 2.5.3 for Python >= 3.12 (2.4.6 stays for 3.11 via transitive constraints).numpy.random.mtrand,spacy.ml.parser_model, and a blankenpipeline all import and run fine.AI assistance disclosure
This change was prepared with AI assistance and reviewed by the author before submission.