File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 6060# extension module deprecations
6161from pandas .util .depr_module import _DeprecatedModule
6262
63- json = _DeprecatedModule (deprmod = 'pandas.json' , deprmodto = 'pandas.io.json.libjson' )
64- parser = _DeprecatedModule (deprmod = 'pandas.parser' , deprmodto = 'pandas.io.libparsers' )
63+ json = _DeprecatedModule (deprmod = 'pandas.json' ,
64+ moved = {'dumps' : 'pandas.io.json.dumps' ,
65+ 'loads' : 'pandas.io.json.loads' })
66+ parser = _DeprecatedModule (deprmod = 'pandas.parser' ,
67+ removals = ['na_values' ],
68+ moved = {'CParserError' : 'pandas.errors.ParserError' })
6569lib = _DeprecatedModule (deprmod = 'pandas.lib' , deprmodto = 'pandas._libs.lib' ,
6670 moved = {'infer_dtype' : 'pandas.api.lib.infer_dtype' })
67- tslib = _DeprecatedModule (deprmod = 'pandas.tslib' , deprmodto = 'pandas._libs.tslib' ,
71+ tslib = _DeprecatedModule (deprmod = 'pandas.tslib' ,
6872 moved = {'Timestamp' : 'pandas.Timestamp' ,
6973 'Timedelta' : 'pandas.Timedelta' ,
7074 'NaT' : 'pandas.NaT' ,
Original file line number Diff line number Diff line change 22
33import warnings
44warnings .warn ("The pandas.tslib module is deprecated and will be "
5- "removed in a future version. Please import from "
6- "the pandas or pandas.errors instead" , FutureWarning , stacklevel = 2 )
5+ "removed in a future version." , FutureWarning , stacklevel = 2 )
76from pandas ._libs .tslib import (Timestamp , Timedelta ,
87 NaT , OutOfBoundsDatetime )
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def __getattr__(self, name):
6868 elif self .moved is not None and name in self .moved :
6969 warnings .warn (
7070 "{deprmod} is deprecated and will be removed in "
71- "a future version.\n You can access {name} in {moved}" .format (
71+ "a future version.\n You can access {name} as {moved}" .format (
7272 deprmod = self .deprmod ,
7373 name = name ,
7474 moved = self .moved [name ]),
You can’t perform that action at this time.
0 commit comments