File tree 3 files changed +9
-6
lines changed
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 60
60
# extension module deprecations
61
61
from pandas .util .depr_module import _DeprecatedModule
62
62
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' })
65
69
lib = _DeprecatedModule (deprmod = 'pandas.lib' , deprmodto = 'pandas._libs.lib' ,
66
70
moved = {'infer_dtype' : 'pandas.api.lib.infer_dtype' })
67
- tslib = _DeprecatedModule (deprmod = 'pandas.tslib' , deprmodto = 'pandas._libs.tslib' ,
71
+ tslib = _DeprecatedModule (deprmod = 'pandas.tslib' ,
68
72
moved = {'Timestamp' : 'pandas.Timestamp' ,
69
73
'Timedelta' : 'pandas.Timedelta' ,
70
74
'NaT' : 'pandas.NaT' ,
Original file line number Diff line number Diff line change 2
2
3
3
import warnings
4
4
warnings .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 )
7
6
from pandas ._libs .tslib import (Timestamp , Timedelta ,
8
7
NaT , OutOfBoundsDatetime )
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def __getattr__(self, name):
68
68
elif self .moved is not None and name in self .moved :
69
69
warnings .warn (
70
70
"{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 (
72
72
deprmod = self .deprmod ,
73
73
name = name ,
74
74
moved = self .moved [name ]),
You can’t perform that action at this time.
0 commit comments