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
TYP: update supported Mypy version from 1.0.0 to 1.10.0 #20600
Conversation
[skip cirrus] [skip circle]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff looks "ok" to me, pinning mypy
can prevent frequent breaks. I saw a few failures with 3.12 when I ran python dev.py mypy
on this branch locally with NumPy 2.0.0rc1
(below the fold).
scipy/spatial/_qhull.pyi:141: error: Name "np.bool_" is not defined [name-defined]
scipy/_lib/_util.py:31: error: Module "numpy" has no attribute "AxisError" [attr-defined]
scipy/_lib/_util.py:31: error: Name "AxisError" already defined on line 21 [no-redef]
scipy/_lib/_util.py:31: error: Module "numpy" has no attribute "ComplexWarning" [attr-defined]
scipy/_lib/_util.py:31: error: Name "ComplexWarning" already defined on line 22 [no-redef]
scipy/_lib/_util.py:31: error: Module "numpy" has no attribute "VisibleDeprecationWarning" [attr-defined]
scipy/_lib/_util.py:31: error: Name "VisibleDeprecationWarning" already defined on line 23 [no-redef]
scipy/_lib/_util.py:47: error: Unused "type: ignore" comment [unused-ignore]
scipy/_lib/_util.py:48: error: Unused "type: ignore" comment [unused-ignore]
scipy/_lib/_util.py:68: error: Unused "type: ignore" comment [unused-ignore]
scipy/spatial/tests/test_spherical_voronoi.py:130: error: Unused "type: ignore" comment [unused-ignore]
With NumPy 1.26.4
(basically the stuff from requirements/all.txt
) I saw just 1 issue locally:
scipy/spatial/tests/test_spherical_voronoi.py:130: error: Unused "type: ignore" comment [unused-ignore]
but still 24 less errors than on main
, so if CI doesn't care and it is just me seeing that fair enough.
Does this fix the typing issues in #20593? |
Yep. I am seeing a few other errors too locally, but it's essentially impossible to make Mypy happy in multiple configs. So I'd say that if CI is green and the changes make sense, everything else can be ignored.
No, but I started to work on those, which triggered this PR. I want to keep a Mypy upgrade separate from changes to array API support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rgommers
This is pretty straightforward; needed to support Python 3.12