Skip to content

Conversation

charris
Copy link
Member

@charris charris commented Sep 6, 2025

Backport #29695.

This partially addresses the incorrect way that we've been defining the methods of scalar types. Currently, this accidentally woirks in mypy, but there are good reasons for why it shouldn't. But as it currently stands, mypy can't address this, because that would cause problems for many libraries that use numpy.

Unless mypy_primer complains, then I'd like to backjport this, so that mypy doesn't have to wait ~5 months or so.

See python/mypy#15993 (comment) for context.

Note that the integer and floating scalar-type also have this issue. I'll address those in separate PR's (this weekend, hopefully).

@charris charris added this to the 2.3.3 release milestone Sep 6, 2025
@charris charris added 08 - Backport Used to tag backport PRs 41 - Static typing labels Sep 6, 2025
@charris charris merged commit 84f2eed into numpy:maintenance/2.3.x Sep 6, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 - Backport Used to tag backport PRs 41 - Static typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants