Skip to content

Commit 2de5d48

Browse files
Use DeprecationWarning for core.common deprecations (GH13634)
1 parent 29d9e24 commit 2de5d48

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/api/tests/test_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def test_types(self):
163163
self.check(types, self.allowed)
164164

165165
def check_deprecation(self, fold, fnew):
166-
with tm.assert_produces_warning(FutureWarning):
166+
with tm.assert_produces_warning(DeprecationWarning):
167167
try:
168168
result = fold('foo')
169169
expected = fnew('foo')

pandas/core/common.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def wrapper(*args, **kwargs):
3131
warnings.warn("pandas.core.common.{t} is deprecated. "
3232
"import from the public API: "
3333
"pandas.api.types.{t} instead".format(t=t),
34-
FutureWarning, stacklevel=3)
34+
DeprecationWarning, stacklevel=3)
3535
return getattr(types, t)(*args, **kwargs)
3636
return wrapper
3737

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

0 commit comments

Comments
 (0)