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

slice is hashable starting with Python 3.12 #12832

Merged
merged 1 commit into from
Oct 17, 2024
Merged

slice is hashable starting with Python 3.12 #12832

merged 1 commit into from
Oct 17, 2024

Conversation

bersbersbers
Copy link
Contributor

Closes #12824

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/core/frame.pyi:608: error: Overloaded function signatures 2 and 3 overlap with incompatible return types  [overload-overlap]

@bersbersbers
Copy link
Contributor Author

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/core/frame.pyi:608: error: Overloaded function signatures 2 and 3 overlap with incompatible return types  [overload-overlap]

I guess this is acceptable - pandas-stubs has # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] in line 606 already, and with this PR, they likely need it in line 608 as well:

https://github.com/pandas-dev/pandas-stubs/blob/f71224c6211ff436424be614ba47f494f64c4618/pandas-stubs/core/frame.pyi#L605-L610

@srittau srittau merged commit b78b3f1 into python:main Oct 17, 2024
62 checks passed
@bersbersbers bersbersbers deleted the slice-hashable branch October 18, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

slice is hashable since Python 3.12
2 participants