Skip to content

Commit

Permalink
Add CategoricalDtype to deprecated core.categorical shim (#19373)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and jreback committed Jan 25, 2018
1 parent b4662cd commit 83e95e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions pandas/core/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
FutureWarning, stacklevel=2)

from pandas.core.arrays import Categorical # noqa
from pandas.core.dtypes.dtypes import CategoricalDtype # noqa
5 changes: 5 additions & 0 deletions pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,8 @@ def test_categorical_move(self):

with tm.assert_produces_warning(FutureWarning):
from pandas.core.categorical import Categorical # noqa

sys.modules.pop("pandas.core.categorical", None)

with tm.assert_produces_warning(FutureWarning):
from pandas.core.categorical import CategoricalDtype # noqa

0 comments on commit 83e95e0

Please sign in to comment.