Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: Remove pd.parser, lib, and tslib #23378

Merged
merged 1 commit into from
Oct 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/travis-27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies:
- s3fs
- scipy
- sqlalchemy=0.9.6
- xarray=0.8.0
- xarray=0.9.6
- xlrd=0.9.2
- xlsxwriter=0.5.2
- xlwt=0.7.5
Expand Down
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ Removal of prior version deprecations/changes
- Removal of the previously deprecated ``as_indexer`` keyword completely from ``str.match()`` (:issue:`22356`, :issue:`6581`)
- 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`)
- ``pandas.parser``, ``pandas.lib``, and ``pandas.tslib`` have been removed (:issue:`15537`)
- :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`)
- :meth:`SparseArray.get_values` and :meth:`SparseArray.to_dense` have dropped the ``fill`` parameter (:issue:`14686`)
Expand Down
18 changes: 0 additions & 18 deletions pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,6 @@
from pandas.util._tester import test
import pandas.testing

# extension module deprecations
from pandas.util._depr_module import _DeprecatedModule

parser = _DeprecatedModule(deprmod='pandas.parser',
removals=['na_values'],
moved={'CParserError': 'pandas.errors.ParserError'})
lib = _DeprecatedModule(deprmod='pandas.lib', deprmodto=False,
moved={'Timestamp': 'pandas.Timestamp',
'Timedelta': 'pandas.Timedelta',
'NaT': 'pandas.NaT',
'infer_dtype': 'pandas.api.types.infer_dtype'})
tslib = _DeprecatedModule(deprmod='pandas.tslib',
moved={'Timestamp': 'pandas.Timestamp',
'Timedelta': 'pandas.Timedelta',
'NaT': 'pandas.NaT',
'NaTType': 'type(pandas.NaT)',
'OutOfBoundsDatetime': 'pandas.errors.OutOfBoundsDatetime'})

# use the closest tagged version if possible
from ._version import get_versions
v = get_versions()
Expand Down
8 changes: 0 additions & 8 deletions pandas/lib.py

This file was deleted.

8 changes: 0 additions & 8 deletions pandas/parser.py

This file was deleted.

23 changes: 1 addition & 22 deletions pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TestPDApi(Base):
'util', 'options', 'io']

# these are already deprecated; awaiting removal
deprecated_modules = ['parser', 'lib', 'tslib']
deprecated_modules = []

# misc
misc = ['IndexSlice', 'NaT']
Expand Down Expand Up @@ -172,27 +172,6 @@ def test_get_store(self):
s.close()


class TestParser(object):

@pytest.mark.filterwarnings("ignore")
def test_deprecation_access_func(self):
pd.parser.na_values


class TestLib(object):

@pytest.mark.filterwarnings("ignore")
def test_deprecation_access_func(self):
pd.lib.infer_dtype('foo')


class TestTSLib(object):

@pytest.mark.filterwarnings("ignore")
def test_deprecation_access_func(self):
pd.tslib.Timestamp('20160101')


class TestTypes(object):

def test_deprecation_access_func(self):
Expand Down
14 changes: 0 additions & 14 deletions pandas/tests/api/test_types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
import sys
import pytest

from pandas.api import types
Expand Down Expand Up @@ -53,16 +52,3 @@ def test_deprecated_from_api_types(self):
with tm.assert_produces_warning(FutureWarning,
check_stacklevel=False):
getattr(types, t)(1)


def test_moved_infer_dtype():
# del from sys.modules to ensure we try to freshly load.
# if this was imported from another test previously, we would
# not see the warning, since the import is otherwise cached.
sys.modules.pop("pandas.lib", None)

with tm.assert_produces_warning(FutureWarning):
import pandas.lib

e = pandas.lib.infer_dtype('foo')
assert e is not None
8 changes: 0 additions & 8 deletions pandas/tests/test_errors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-

import pytest
from warnings import catch_warnings, simplefilter
import pandas # noqa
import pandas as pd
from pandas.errors import AbstractMethodError
Expand Down Expand Up @@ -47,13 +46,6 @@ def test_error_rename():
except CParserError:
pass

with catch_warnings(record=True):
simplefilter("ignore")
try:
raise ParserError()
except pd.parser.CParserError:
pass


class Foo(object):
@classmethod
Expand Down
7 changes: 0 additions & 7 deletions pandas/tslib.py

This file was deleted.