Skip to content

Commit 16646fc

Browse files
jorisvandenbosschemroeschke
authored andcommitted
ExtensionArray.fillna: start with DeprecationWarning about added copy keyword (pandas-dev#54800)
1 parent d84e97b commit 16646fc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pandas/core/internals/blocks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ def fillna(
20082008
"need to implement this keyword or an exception will be "
20092009
"raised. In the interim, the keyword is ignored by "
20102010
f"{type(self.values).__name__}.",
2011-
FutureWarning,
2011+
DeprecationWarning,
20122012
stacklevel=find_stack_level(),
20132013
)
20142014

pandas/tests/extension/decimal/test_decimal.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_arith_series_with_array(self, data, all_arithmetic_operators):
133133
def test_fillna_frame(self, data_missing):
134134
msg = "ExtensionArray.fillna added a 'copy' keyword"
135135
with tm.assert_produces_warning(
136-
FutureWarning, match=msg, check_stacklevel=False
136+
DeprecationWarning, match=msg, check_stacklevel=False
137137
):
138138
super().test_fillna_frame(data_missing)
139139

@@ -166,7 +166,7 @@ def test_fillna_no_op_returns_copy(self, data):
166166
def test_fillna_series(self, data_missing):
167167
msg = "ExtensionArray.fillna added a 'copy' keyword"
168168
with tm.assert_produces_warning(
169-
FutureWarning, match=msg, check_stacklevel=False
169+
DeprecationWarning, match=msg, check_stacklevel=False
170170
):
171171
super().test_fillna_series(data_missing)
172172

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

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

186186
def test_fillna_copy_series(self, data_missing, using_copy_on_write):
187-
warn = FutureWarning if not using_copy_on_write else None
187+
warn = DeprecationWarning if not using_copy_on_write else None
188188
msg = "ExtensionArray.fillna added a 'copy' keyword"
189189
with tm.assert_produces_warning(warn, match=msg, check_stacklevel=False):
190190
super().test_fillna_copy_series(data_missing)

0 commit comments

Comments
 (0)