Skip to content

Commit b54e266

Browse files
jorisvandenbosschemeeseeksmachine
authored andcommitted
Backport PR pandas-dev#54800: ExtensionArray.fillna: start with DeprecationWarning about added copy keyword
1 parent 72cb101 commit b54e266

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
@@ -2015,7 +2015,7 @@ def fillna(
20152015
"need to implement this keyword or an exception will be "
20162016
"raised. In the interim, the keyword is ignored by "
20172017
f"{type(self.values).__name__}.",
2018-
FutureWarning,
2018+
DeprecationWarning,
20192019
stacklevel=find_stack_level(),
20202020
)
20212021

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)