Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hypothesis-python does not pin numpy, resulting in import error downstream #3625

Closed
pllim opened this issue Apr 26, 2023 · 2 comments · Fixed by #3626
Closed

hypothesis-python does not pin numpy, resulting in import error downstream #3625

pllim opened this issue Apr 26, 2023 · 2 comments · Fixed by #3626
Labels
bug something is clearly wrong here tests/build/CI about testing or deployment *of* Hypothesis

Comments

@pllim
Copy link

pllim commented Apr 26, 2023

We use hypothesis with older numpy (1.20) in an older release branch. We started seeing failure when hypothesis 6.74 was released. If hypothesis-python is no longer compatible with older numpy, it should pin numpy minversion accordingly.

Example log: https://github.com/astropy/astropy/actions/runs/4812578157/jobs/8568004842?pr=14696

Example traceback:

astropy/time/tests/test_precision.py:13: in <module>
    from hypothesis.extra.numpy import array_shapes, arrays
hypothesis/extra/numpy.py:15: in <module>
    from numpy.typing import DTypeLike, NDArray
E   ImportError: cannot import name 'NDArray' from 'numpy.typing' (numpy/typing/__init__.py)
_ ERROR collecting astropy/time/tests/test_precision.py _
@Zac-HD Zac-HD added bug something is clearly wrong here tests/build/CI about testing or deployment *of* Hypothesis labels Apr 26, 2023
@Zac-HD
Copy link
Member

Zac-HD commented Apr 27, 2023

Thanks for the report @pllim - we'll restore compatibility with older Numpy versions, and add a CI job based on the declared minimum version to prevent future regressions, within the next few days.

@pllim
Copy link
Author

pllim commented Apr 27, 2023

Thank you for the quick response! There is no rush on our end. We pinned that job to hypothesis 6.72.3 because turns out 6.72.4 also has the incompatible import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is clearly wrong here tests/build/CI about testing or deployment *of* Hypothesis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants