Skip to content

DEPR: Change current DeprecationWarnings to FutureWarnings #27113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pandas/core/internals/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,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.", DeprecationWarning)
"in a future release.", FutureWarning)
if placement is None:
placement = self.mgr_locs
return make_block(values, placement=placement, ndim=ndim,
Expand Down Expand Up @@ -1794,7 +1794,7 @@ def formatting_values(self):
"'ExtensionArray._formatting_values' is deprecated. "
"Specify 'ExtensionArray._formatter' instead."
)
warnings.warn(msg, DeprecationWarning, stacklevel=10)
warnings.warn(msg, FutureWarning, stacklevel=10)
return self.values._formatting_values()

return self.values
Expand Down Expand Up @@ -3056,7 +3056,7 @@ def make_block(values, placement, klass=None, ndim=None, dtype=None,
if fastpath is not None:
# GH#19265 pyarrow is passing this
warnings.warn("fastpath argument is deprecated, will be removed "
"in a future release.", DeprecationWarning)
"in a future release.", FutureWarning)
if klass is None:
dtype = dtype or values.dtype
klass = get_block_type(values, dtype)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/extension/decimal/test_decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,6 @@ def _formatting_values(self):

ser = pd.Series(DecimalArray2([decimal.Decimal('1.0')]))

with tm.assert_produces_warning(DeprecationWarning,
with tm.assert_produces_warning(FutureWarning,
check_stacklevel=False):
repr(ser)
8 changes: 4 additions & 4 deletions pandas/tests/indexes/test_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ def test_start_stop_step_attrs(self, index, start, stop, step):
assert index.stop == stop
assert index.step == step

def test_deprecated_start_stop_step_attrs(self):
@pytest.mark.parametrize('attr_name', ['_start', '_stop', '_step'])
def test_deprecated_start_stop_step_attrs(self, attr_name):
# GH 26581
idx = self.create_index()
for attr_name in ['_start', '_stop', '_step']:
with tm.assert_produces_warning(DeprecationWarning):
getattr(idx, attr_name)
with tm.assert_produces_warning(DeprecationWarning):
getattr(idx, attr_name)

def test_copy(self):
i = RangeIndex(5, name='Foo')
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/internals/test_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ 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(DeprecationWarning,
with tm.assert_produces_warning(FutureWarning,
check_stacklevel=False):
block.make_block_same_class(block.values,
dtype=block.values.dtype)
Expand Down Expand Up @@ -1254,7 +1254,7 @@ def test_holder(typestr, holder):
def test_deprecated_fastpath():
# GH#19265
values = np.random.rand(3, 3)
with tm.assert_produces_warning(DeprecationWarning,
with tm.assert_produces_warning(FutureWarning,
check_stacklevel=False):
make_block(values, placement=np.arange(3), fastpath=True)

Expand Down