Skip to content

Commit

Permalink
Change Future to DeprecationWarning for make_block_same_class (pandas…
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and harisbal committed Feb 28, 2018
1 parent ab51851 commit e4e7255
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pandas/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def make_block_same_class(self, values, placement=None, ndim=None,
if dtype is not None:
# issue 19431 fastparquet is passing this
warnings.warn("dtype argument is deprecated, will be removed "
"in a future release.", FutureWarning)
"in a future release.", DeprecationWarning)
if placement is None:
placement = self.mgr_locs
return make_block(values, placement=placement, ndim=ndim,
Expand Down
5 changes: 3 additions & 2 deletions pandas/tests/internals/test_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,10 @@ def test_delete(self):
def test_make_block_same_class(self):
# issue 19431
block = create_block('M8[ns, US/Eastern]', [3])
with tm.assert_produces_warning(FutureWarning,
with tm.assert_produces_warning(DeprecationWarning,
check_stacklevel=False):
block.make_block_same_class(block.values, dtype=block.values.dtype)
block.make_block_same_class(block.values.values,
dtype=block.values.dtype)


class TestDatetimeBlock(object):
Expand Down

0 comments on commit e4e7255

Please sign in to comment.