Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TYP: Always accept date[time] in the datetime64 constructor #28110

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

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

jorenham
Copy link
Member

@jorenham jorenham commented Jan 6, 2025

This fixes a regression that was introduced in #27790, which results in e.g. datetime64(datetime(2015, 3, 14), "us") to be falsely rejected by static type-checkers.
This is causing a mypy error to be reported in a polar unit test: pola-rs/polars#20561.

@jorenham jorenham added the 09 - Backport-Candidate PRs tagged should be backported label Jan 6, 2025
@jorenham jorenham added this to the 2.2.2 release milestone Jan 6, 2025
@charris charris merged commit dcbc24e into numpy:main Jan 6, 2025
70 checks passed
@charris
Copy link
Member

charris commented Jan 6, 2025

Thanks Joren.

@jorenham jorenham deleted the typing/datetime64-constructor-fix branch January 6, 2025 22:31
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jan 6, 2025
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.