Skip to content

Commit 86e439e

Browse files
committed
CLN: Remove pd.parser, lib, and tslib
xref pandas-devgh-15537. Need to bumpy xarray version for Travis 2.7 because 0.8.0 becomes incompatible with this change.
1 parent f662c5f commit 86e439e

File tree

9 files changed

+3
-86
lines changed

9 files changed

+3
-86
lines changed

ci/travis-27.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies:
3535
- s3fs
3636
- scipy
3737
- sqlalchemy=0.9.6
38-
- xarray=0.8.0
38+
- xarray=0.9.6
3939
- xlrd=0.9.2
4040
- xlsxwriter=0.5.2
4141
- xlwt=0.7.5

doc/source/whatsnew/v0.24.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ Removal of prior version deprecations/changes
944944
- Removal of the previously deprecated ``as_indexer`` keyword completely from ``str.match()`` (:issue:`22356`, :issue:`6581`)
945945
- Removed the ``pandas.formats.style`` shim for :class:`pandas.io.formats.style.Styler` (:issue:`16059`)
946946
- :meth:`Categorical.searchsorted` and :meth:`Series.searchsorted` have renamed the ``v`` argument to ``value`` (:issue:`14645`)
947+
- ``pandas.parser``, ``pandas.lib``, and ``pandas.tslib`` have been removed (:issue:`15537`)
947948
- :meth:`TimedeltaIndex.searchsorted`, :meth:`DatetimeIndex.searchsorted`, and :meth:`PeriodIndex.searchsorted` have renamed the ``key`` argument to ``value`` (:issue:`14645`)
948949
- Removal of the previously deprecated module ``pandas.json`` (:issue:`19944`)
949950
- :meth:`SparseArray.get_values` and :meth:`SparseArray.to_dense` have dropped the ``fill`` parameter (:issue:`14686`)

pandas/__init__.py

-18
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,6 @@
5858
from pandas.util._tester import test
5959
import pandas.testing
6060

61-
# extension module deprecations
62-
from pandas.util._depr_module import _DeprecatedModule
63-
64-
parser = _DeprecatedModule(deprmod='pandas.parser',
65-
removals=['na_values'],
66-
moved={'CParserError': 'pandas.errors.ParserError'})
67-
lib = _DeprecatedModule(deprmod='pandas.lib', deprmodto=False,
68-
moved={'Timestamp': 'pandas.Timestamp',
69-
'Timedelta': 'pandas.Timedelta',
70-
'NaT': 'pandas.NaT',
71-
'infer_dtype': 'pandas.api.types.infer_dtype'})
72-
tslib = _DeprecatedModule(deprmod='pandas.tslib',
73-
moved={'Timestamp': 'pandas.Timestamp',
74-
'Timedelta': 'pandas.Timedelta',
75-
'NaT': 'pandas.NaT',
76-
'NaTType': 'type(pandas.NaT)',
77-
'OutOfBoundsDatetime': 'pandas.errors.OutOfBoundsDatetime'})
78-
7961
# use the closest tagged version if possible
8062
from ._version import get_versions
8163
v = get_versions()

pandas/lib.py

-8
This file was deleted.

pandas/parser.py

-8
This file was deleted.

pandas/tests/api/test_api.py

+1-22
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TestPDApi(Base):
3434
'util', 'options', 'io']
3535

3636
# these are already deprecated; awaiting removal
37-
deprecated_modules = ['parser', 'lib', 'tslib']
37+
deprecated_modules = []
3838

3939
# misc
4040
misc = ['IndexSlice', 'NaT']
@@ -172,27 +172,6 @@ def test_get_store(self):
172172
s.close()
173173

174174

175-
class TestParser(object):
176-
177-
@pytest.mark.filterwarnings("ignore")
178-
def test_deprecation_access_func(self):
179-
pd.parser.na_values
180-
181-
182-
class TestLib(object):
183-
184-
@pytest.mark.filterwarnings("ignore")
185-
def test_deprecation_access_func(self):
186-
pd.lib.infer_dtype('foo')
187-
188-
189-
class TestTSLib(object):
190-
191-
@pytest.mark.filterwarnings("ignore")
192-
def test_deprecation_access_func(self):
193-
pd.tslib.Timestamp('20160101')
194-
195-
196175
class TestTypes(object):
197176

198177
def test_deprecation_access_func(self):

pandas/tests/api/test_types.py

-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
import sys
32
import pytest
43

54
from pandas.api import types
@@ -53,16 +52,3 @@ def test_deprecated_from_api_types(self):
5352
with tm.assert_produces_warning(FutureWarning,
5453
check_stacklevel=False):
5554
getattr(types, t)(1)
56-
57-
58-
def test_moved_infer_dtype():
59-
# del from sys.modules to ensure we try to freshly load.
60-
# if this was imported from another test previously, we would
61-
# not see the warning, since the import is otherwise cached.
62-
sys.modules.pop("pandas.lib", None)
63-
64-
with tm.assert_produces_warning(FutureWarning):
65-
import pandas.lib
66-
67-
e = pandas.lib.infer_dtype('foo')
68-
assert e is not None

pandas/tests/test_errors.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22

33
import pytest
4-
from warnings import catch_warnings, simplefilter
54
import pandas # noqa
65
import pandas as pd
76
from pandas.errors import AbstractMethodError
@@ -47,13 +46,6 @@ def test_error_rename():
4746
except CParserError:
4847
pass
4948

50-
with catch_warnings(record=True):
51-
simplefilter("ignore")
52-
try:
53-
raise ParserError()
54-
except pd.parser.CParserError:
55-
pass
56-
5749

5850
class Foo(object):
5951
@classmethod

pandas/tslib.py

-7
This file was deleted.

0 commit comments

Comments
 (0)