Skip to content

BUG: Allow legacy dtypes to cast to datetime again#21445

Merged
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-21372
May 5, 2022
Merged

BUG: Allow legacy dtypes to cast to datetime again#21445
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-21372

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented May 5, 2022

Backport of #21372.

This constraint was added out of a caution with the thought that nobody
uses it. Turns out ora does use it.
In practice, this only affects cast to and from datetimes (or possibly
strings but that seems even less likely).

Tested via ora (see #21365) the paths are not particularly special,
but the parametric dtype resolution is in principle missing.
This is not particularly problematic, since NumPy barely exposes that
though, and it never worked.

Closes #21365


Test is missing, it could be added a rational to string cast probably, but overall it seems ora is working fine with it (see issue) and I always only added the check because I thought that without a proper dtype resolution, this is probably useless in any case. (proper dtype resolution was not possible previously)

If there is a small chance of another 1.21.x release, this should also be backported to there.

This constraint was added out of a caution with the thought that nobody
uses it.  Turns out ora does use it.
In practice, this only affects cast to and from datetimes (or possibly
strings but that seems even less likely).

Tested via ora (see numpygh-21365) the paths are not particularly special,
but the parametric dtype resolution is in principle missing.
This is not particularly problematic, since NumPy barely exposes that
though, and it never worked.

Closes numpygh-21365
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels May 5, 2022
@charris charris added this to the 1.22.4 release milestone May 5, 2022
@charris charris merged commit a0e69d5 into numpy:maintenance/1.22.x May 5, 2022
@charris charris deleted the backport-21372 branch May 5, 2022 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants