diff --git a/doc/source/whatsnew/v0.24.0.txt b/doc/source/whatsnew/v0.24.0.txt index 649629714c3b1..34eb5d8d7ed0f 100644 --- a/doc/source/whatsnew/v0.24.0.txt +++ b/doc/source/whatsnew/v0.24.0.txt @@ -577,6 +577,7 @@ Removal of prior version deprecations/changes - Removed the ``pandas.formats.style`` shim for :class:`pandas.io.formats.style.Styler` (:issue:`16059`) - :meth:`Categorical.searchsorted` and :meth:`Series.searchsorted` have renamed the ``v`` argument to ``value`` (:issue:`14645`) - :meth:`TimedeltaIndex.searchsorted`, :meth:`DatetimeIndex.searchsorted`, and :meth:`PeriodIndex.searchsorted` have renamed the ``key`` argument to ``value`` (:issue:`14645`) +- Removal of the previously deprecated module ``pandas.json`` (:issue:`19944`) .. _whatsnew_0240.performance: diff --git a/pandas/__init__.py b/pandas/__init__.py index 97ae73174c09c..f91d0aa84e0ff 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -61,9 +61,6 @@ # extension module deprecations from pandas.util._depr_module import _DeprecatedModule -json = _DeprecatedModule(deprmod='pandas.json', - moved={'dumps': 'pandas.io.json.dumps', - 'loads': 'pandas.io.json.loads'}) parser = _DeprecatedModule(deprmod='pandas.parser', removals=['na_values'], moved={'CParserError': 'pandas.errors.ParserError'}) diff --git a/pandas/json.py b/pandas/json.py deleted file mode 100644 index 16d6580c87951..0000000000000 --- a/pandas/json.py +++ /dev/null @@ -1,7 +0,0 @@ -# flake8: noqa - -import warnings -warnings.warn("The pandas.json module is deprecated and will be " - "removed in a future version. Please import from " - "pandas.io.json instead", FutureWarning, stacklevel=2) -from pandas._libs.json import dumps, loads diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index bf9e14b427015..199700b304a4e 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -35,7 +35,7 @@ class TestPDApi(Base): 'util', 'options', 'io'] # these are already deprecated; awaiting removal - deprecated_modules = ['parser', 'json', 'lib', 'tslib'] + deprecated_modules = ['parser', 'lib', 'tslib'] # misc misc = ['IndexSlice', 'NaT'] @@ -173,13 +173,6 @@ def test_get_store(self): s.close() -class TestJson(object): - - def test_deprecation_access_func(self): - with catch_warnings(record=True): - pd.json.dumps([]) - - class TestParser(object): def test_deprecation_access_func(self):