Skip to content

Commit 83e95e0

Browse files
jorisvandenbosschejreback
authored andcommitted
Add CategoricalDtype to deprecated core.categorical shim (#19373)
1 parent b4662cd commit 83e95e0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pandas/core/categorical.py

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
FutureWarning, stacklevel=2)
66

77
from pandas.core.arrays import Categorical # noqa
8+
from pandas.core.dtypes.dtypes import CategoricalDtype # noqa

pandas/tests/api/test_api.py

+5
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,8 @@ def test_categorical_move(self):
259259

260260
with tm.assert_produces_warning(FutureWarning):
261261
from pandas.core.categorical import Categorical # noqa
262+
263+
sys.modules.pop("pandas.core.categorical", None)
264+
265+
with tm.assert_produces_warning(FutureWarning):
266+
from pandas.core.categorical import CategoricalDtype # noqa

0 commit comments

Comments
 (0)