Skip to content
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

ExtensionArray.fillna: start with DeprecationWarning about added copy keyword #54800

Merged
merged 2 commits into from
Aug 28, 2023
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
2 changes: 1 addition & 1 deletion pandas/core/internals/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ def fillna(
"need to implement this keyword or an exception will be "
"raised. In the interim, the keyword is ignored by "
f"{type(self.values).__name__}.",
FutureWarning,
DeprecationWarning,
stacklevel=find_stack_level(),
)

Expand Down
8 changes: 4 additions & 4 deletions pandas/tests/extension/decimal/test_decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_arith_series_with_array(self, data, all_arithmetic_operators):
def test_fillna_frame(self, data_missing):
msg = "ExtensionArray.fillna added a 'copy' keyword"
with tm.assert_produces_warning(
FutureWarning, match=msg, check_stacklevel=False
DeprecationWarning, match=msg, check_stacklevel=False
):
super().test_fillna_frame(data_missing)

Expand Down Expand Up @@ -166,7 +166,7 @@ def test_fillna_no_op_returns_copy(self, data):
def test_fillna_series(self, data_missing):
msg = "ExtensionArray.fillna added a 'copy' keyword"
with tm.assert_produces_warning(
FutureWarning, match=msg, check_stacklevel=False
DeprecationWarning, match=msg, check_stacklevel=False
):
super().test_fillna_series(data_missing)

Expand All @@ -178,13 +178,13 @@ def test_fillna_series_method(self, data_missing, fillna_method):
super().test_fillna_series_method(data_missing, fillna_method)

def test_fillna_copy_frame(self, data_missing, using_copy_on_write):
warn = FutureWarning if not using_copy_on_write else None
warn = DeprecationWarning if not using_copy_on_write else None
msg = "ExtensionArray.fillna added a 'copy' keyword"
with tm.assert_produces_warning(warn, match=msg, check_stacklevel=False):
super().test_fillna_copy_frame(data_missing)

def test_fillna_copy_series(self, data_missing, using_copy_on_write):
warn = FutureWarning if not using_copy_on_write else None
warn = DeprecationWarning if not using_copy_on_write else None
msg = "ExtensionArray.fillna added a 'copy' keyword"
with tm.assert_produces_warning(warn, match=msg, check_stacklevel=False):
super().test_fillna_copy_series(data_missing)
Expand Down
Loading