Skip to content

Commit

Permalink
Use DeprecationWarning for core.common deprecations (GH13634)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Aug 13, 2016
1 parent 29d9e24 commit 2de5d48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pandas/api/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_types(self):
self.check(types, self.allowed)

def check_deprecation(self, fold, fnew):
with tm.assert_produces_warning(FutureWarning):
with tm.assert_produces_warning(DeprecationWarning):
try:
result = fold('foo')
expected = fnew('foo')
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def wrapper(*args, **kwargs):
warnings.warn("pandas.core.common.{t} is deprecated. "
"import from the public API: "
"pandas.api.types.{t} instead".format(t=t),
FutureWarning, stacklevel=3)
DeprecationWarning, stacklevel=3)
return getattr(types, t)(*args, **kwargs)
return wrapper

Expand All @@ -57,7 +57,7 @@ def wrapper(*args, **kwargs):
"These are not longer public API functions, "
"but can be imported from "
"pandas.types.common.{t} instead".format(t=t),
FutureWarning, stacklevel=3)
DeprecationWarning, stacklevel=3)
return getattr(common, t)(*args, **kwargs)
return wrapper

Expand Down

0 comments on commit 2de5d48

Please sign in to comment.