diff --git a/doc/source/whatsnew/v0.24.0.txt b/doc/source/whatsnew/v0.24.0.txt index 11e3a73cd8c304..9ebcaeed32240f 100644 --- a/doc/source/whatsnew/v0.24.0.txt +++ b/doc/source/whatsnew/v0.24.0.txt @@ -944,6 +944,7 @@ Removal of prior version deprecations/changes - :meth:`Index.repeat` and :meth:`MultiIndex.repeat` have renamed the ``n`` argument to ``repeats`` (:issue:`14645`) - The ``Series`` constructor and ``.astype`` method will now raise a ``ValueError`` if timestamp dtypes are passed in without a frequency (e.g. ``np.datetime64``) for the ``dtype`` parameter (:issue:`15987`) - Removal of the previously deprecated ``as_indexer`` keyword completely from ``str.match()`` (:issue:`22356`, :issue:`6581`) +- The modules ``pandas.types``, ``pandas.computation``, and ``pandas.util.decorators`` have been removed (:issue:`16157`, :issue:`16250`) - Removed the ``pandas.formats.style`` shim for :class:`pandas.io.formats.style.Styler` (:issue:`16059`) - :func:`pandas.pnow`, :func:`pandas.match`, :func:`pandas.groupby`, :func:`pd.get_store`, ``pd.Expr``, and ``pd.Term`` have been removed (:issue:`15538`, :issue:`15940`) - :meth:`Categorical.searchsorted` and :meth:`Series.searchsorted` have renamed the ``v`` argument to ``value`` (:issue:`14645`) diff --git a/pandas/computation/__init__.py b/pandas/computation/__init__.py deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/pandas/computation/expressions.py b/pandas/computation/expressions.py deleted file mode 100644 index d194cd2404c9d9..00000000000000 --- a/pandas/computation/expressions.py +++ /dev/null @@ -1,15 +0,0 @@ -import warnings - - -def set_use_numexpr(v=True): - """ - .. deprecated:: 0.20.0 - Use ``pandas.set_option('compute.use_numexpr', v)`` instead. - """ - warnings.warn("pandas.computation.expressions.set_use_numexpr is " - "deprecated and will be removed in a future version.\n" - "you can toggle usage of numexpr via " - "pandas.get_option('compute.use_numexpr')", - FutureWarning, stacklevel=2) - from pandas import set_option - set_option('compute.use_numexpr', v) diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index bb544d2ee81fd9..fef87c9e6c4c25 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -135,20 +135,6 @@ def test_TimeGrouper(self): pd.TimeGrouper(freq='D') -class TestTypes(object): - - def test_deprecation_access_func(self): - with tm.assert_produces_warning( - FutureWarning, check_stacklevel=False): - from pandas.types.concat import union_categoricals - c1 = pd.Categorical(list('aabc')) - c2 = pd.Categorical(list('abcd')) - union_categoricals( - [c1, c2], - sort_categories=True, - ignore_order=True) - - class TestCDateRange(object): def test_deprecation_cdaterange(self): diff --git a/pandas/types/__init__.py b/pandas/types/__init__.py deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/pandas/types/common.py b/pandas/types/common.py deleted file mode 100644 index a125c27d045967..00000000000000 --- a/pandas/types/common.py +++ /dev/null @@ -1,8 +0,0 @@ -import warnings - -warnings.warn("pandas.types.common is deprecated and will be " - "removed in a future version, import " - "from pandas.api.types", - DeprecationWarning, stacklevel=3) - -from pandas.core.dtypes.common import * # noqa diff --git a/pandas/types/concat.py b/pandas/types/concat.py deleted file mode 100644 index 477156b38d56d8..00000000000000 --- a/pandas/types/concat.py +++ /dev/null @@ -1,11 +0,0 @@ -import warnings - - -def union_categoricals(to_union, sort_categories=False, ignore_order=False): - warnings.warn("pandas.types.concat.union_categoricals is " - "deprecated and will be removed in a future version.\n" - "use pandas.api.types.union_categoricals", - FutureWarning, stacklevel=2) - from pandas.api.types import union_categoricals - return union_categoricals( - to_union, sort_categories=sort_categories, ignore_order=ignore_order) diff --git a/pandas/util/decorators.py b/pandas/util/decorators.py deleted file mode 100644 index 54bb834e829f31..00000000000000 --- a/pandas/util/decorators.py +++ /dev/null @@ -1,8 +0,0 @@ -import warnings - -warnings.warn("pandas.util.decorators is deprecated and will be " - "removed in a future version, import " - "from pandas.util", - DeprecationWarning, stacklevel=3) - -from pandas.util._decorators import * # noqa