Skip to content

Commit 8110871

Browse files
committed
CLN: Remove some dtype methods from API
Removes the following from the public API: * pandas.api.types.is_sequence * pandas.api.types.is_any_int_dtype * pandas.api.types.is_floating_dtype xref gh-16163. xref gh-16189.
1 parent da9d851 commit 8110871

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

pandas/core/dtypes/api.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# flake8: noqa
22

3-
import sys
4-
53
from .common import (pandas_dtype,
64
is_dtype_equal,
75
is_extension_type,
@@ -59,24 +57,3 @@
5957
is_list_like,
6058
is_hashable,
6159
is_named_tuple)
62-
63-
64-
# deprecated
65-
m = sys.modules['pandas.core.dtypes.api']
66-
67-
for t in ['is_any_int_dtype', 'is_floating_dtype', 'is_sequence']:
68-
69-
def outer(t=t):
70-
71-
def wrapper(arr_or_dtype):
72-
import warnings
73-
import pandas
74-
warnings.warn("{t} is deprecated and will be "
75-
"removed in a future version".format(t=t),
76-
FutureWarning, stacklevel=3)
77-
return getattr(pandas.core.dtypes.common, t)(arr_or_dtype)
78-
return wrapper
79-
80-
setattr(m, t, outer(t))
81-
82-
del sys, m, t, outer

pandas/core/dtypes/common.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,11 +796,11 @@ def is_dtype_union_equal(source, target):
796796
def is_any_int_dtype(arr_or_dtype):
797797
"""Check whether the provided array or dtype is of an integer dtype.
798798
799-
.. deprecated:: 0.20.0
800-
801799
In this function, timedelta64 instances are also considered "any-integer"
802800
type objects and will return True.
803801
802+
This function is internal and should not be exposed in the public API.
803+
804804
Parameters
805805
----------
806806
arr_or_dtype : array-like
@@ -1560,6 +1560,8 @@ def is_float_dtype(arr_or_dtype):
15601560
"""
15611561
Check whether the provided array or dtype is of a float dtype.
15621562
1563+
This function is internal and should not be exposed in the public API.
1564+
15631565
Parameters
15641566
----------
15651567
arr_or_dtype : array-like

pandas/tests/api/test_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TestTypes(Base):
2828
'is_list_like', 'is_hashable', 'is_array_like',
2929
'is_named_tuple',
3030
'pandas_dtype', 'union_categoricals', 'infer_dtype']
31-
deprecated = ['is_any_int_dtype', 'is_floating_dtype', 'is_sequence']
31+
deprecated = []
3232
dtypes = ['CategoricalDtype', 'DatetimeTZDtype',
3333
'PeriodDtype', 'IntervalDtype']
3434

0 commit comments

Comments
 (0)