BUG: Allow legacy dtypes to cast to datetime again #21445
Merged
+0
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.