Skip to content

TYP: restore generic.__hash__#30456

Merged
charris merged 1 commit intonumpy:mainfrom
jorenham:typing/gh-30445
Dec 17, 2025
Merged

TYP: restore generic.__hash__#30456
charris merged 1 commit intonumpy:mainfrom
jorenham:typing/gh-30445

Conversation

@jorenham
Copy link
Copy Markdown
Member

Closes #30445

@jorenham jorenham added 09 - Backport-Candidate PRs tagged should be backported 41 - Static typing labels Dec 17, 2025
@jorenham jorenham added this to the 2.4.0 release milestone Dec 17, 2025
@github-actions
Copy link
Copy Markdown

Diff from mypy_primer, showing the effect of this PR on type check results on a corpus of open source code:

pandas (https://github.com/pandas-dev/pandas)
- /home/runner/work/numpy/numpy/numpy_base/numpy/__init__.pyi:731: error: Type statement is only supported in Python 3.12 and greater  [syntax]
+ /home/runner/work/numpy/numpy/numpy_to_test/numpy/__init__.pyi:731: error: Type statement is only supported in Python 3.12 and greater  [syntax]

@charris charris merged commit e242181 into numpy:main Dec 17, 2025
74 checks passed
@charris
Copy link
Copy Markdown
Member

charris commented Dec 17, 2025

Thanks Joren.

@jorenham jorenham deleted the typing/gh-30445 branch December 17, 2025 15:52
charris pushed a commit to charris/numpy that referenced this pull request Dec 17, 2025
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Dec 17, 2025
charris added a commit that referenced this pull request Dec 17, 2025
TYP: restore ``generic.__hash__`` (#30456)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TYP: [2.4.0rc1 regression] np.generic no longer Hashable

2 participants