Skip to content

Commit e0d9651

Browse files
Change Future to DeprecationWarning for make_block_same_class (#19442)
1 parent f483321 commit e0d9651

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/core/internals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def make_block_same_class(self, values, placement=None, ndim=None,
230230
if dtype is not None:
231231
# issue 19431 fastparquet is passing this
232232
warnings.warn("dtype argument is deprecated, will be removed "
233-
"in a future release.", FutureWarning)
233+
"in a future release.", DeprecationWarning)
234234
if placement is None:
235235
placement = self.mgr_locs
236236
return make_block(values, placement=placement, ndim=ndim,

pandas/tests/internals/test_internals.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,10 @@ def test_delete(self):
288288
def test_make_block_same_class(self):
289289
# issue 19431
290290
block = create_block('M8[ns, US/Eastern]', [3])
291-
with tm.assert_produces_warning(FutureWarning,
291+
with tm.assert_produces_warning(DeprecationWarning,
292292
check_stacklevel=False):
293-
block.make_block_same_class(block.values, dtype=block.values.dtype)
293+
block.make_block_same_class(block.values.values,
294+
dtype=block.values.dtype)
294295

295296

296297
class TestDatetimeBlock(object):

0 commit comments

Comments
 (0)