Skip to content

DEPR: is_datetime64tz_dtype, is_interval_dtype #52607

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 5 commits into from
Apr 12, 2023

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@@ -319,6 +319,13 @@ def is_datetime64tz_dtype(arr_or_dtype) -> bool:
>>> is_datetime64tz_dtype(s)
True
"""
# GH#52607
warnings.warn(
"is_datetime64tz_dtype is deprecated and will be removed in a future "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be useful if we want to check whether it's a numpy or arrow tz type, but idk if we have a use case for that yet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could. I think the fact that it is ambiguous (based on the name) is all the more reason to deprecate it

@mroeschke mroeschke added the Deprecate Functionality to remove in pandas label Apr 12, 2023
@mroeschke mroeschke added this to the 2.1 milestone Apr 12, 2023
@mroeschke mroeschke merged commit 0ab323f into pandas-dev:main Apr 12, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the depr-is_interval_dtype branch April 12, 2023 17:06
galipremsagar added a commit to rapidsai/cudf that referenced this pull request Oct 12, 2023
This PR deprecates `is_datetime64tz_dtype` and `is_interval_dtype` to have parity with pandas-2.x: pandas-dev/pandas#52607, alternatively this PR internalizes these utilities.

This PR:
```
= 1584 failed, 98570 passed, 2069 skipped, 776 xfailed, 312 xpassed, 20 errors in 737.24s (0:12:17) =
```

On `pandas_2.0_feature_branch`:
```
= 23835 failed, 5698 passed, 1613 skipped, 288 xfailed, 423 errors in 1976.84s (0:32:56) =
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants