Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
43be6b7
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 16, 2025
251ff22
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 17, 2025
0d8bae3
Merge remote-tracking branch 'upstream/main' into fix-63040
Aniketsy Nov 20, 2025
0df38db
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 20, 2025
453b25f
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 22, 2025
5421db1
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 22, 2025
3f6333e
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 22, 2025
964a6d2
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 22, 2025
1bf16a2
EA attribute specifying whether copy=False is ignored
Aniketsy Nov 22, 2025
871f164
EA attribute specifying whether copy=False is ignored
Aniketsy Dec 3, 2025
33f796f
EA attribute specifying whether copy=False is ignored
Aniketsy Dec 3, 2025
b7325fa
EA attribute specifying whether copy=False is ignored
Aniketsy Dec 3, 2025
cbf76eb
EA attribute specifying whether copy=False is ignored
Aniketsy Dec 6, 2025
5a373d5
update from support -> respect
Aniketsy Mar 18, 2026
4178f66
EA attribute specifying whether copy=False is ignored
Aniketsy Mar 19, 2026
963bd84
Update pandas/tests/extension/decimal/array.py
Aniketsy Mar 26, 2026
d0bc508
EA attribute specifying whether copy=False is ignored
Aniketsy Mar 26, 2026
e3da0bc
pass copy=copy
Aniketsy Mar 28, 2026
cdfd705
Revert xfail-test and copy=copy
Aniketsy Mar 31, 2026
9584cd1
EA attribute specifying whether copy=False is ignored
Aniketsy Apr 2, 2026
7fedd5c
EA attribute specifying whether copy=False is ignored
Aniketsy Apr 5, 2026
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
8 changes: 8 additions & 0 deletions pandas/tests/extension/base/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@


class BaseMissingTests:
_supports_fillna_copy_false = True
Comment thread
jbrockmendel marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the name say "respect" instead of "support"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this not fully sure, but I’ve updated it as per your suggestion.


def test_isna(self, data_missing):
expected = np.array([True, False])

Expand Down Expand Up @@ -193,3 +195,9 @@ def test_fillna_fill_other(self, data):
expected = pd.DataFrame({"A": data, "B": [0.0] * len(result)})

tm.assert_frame_equal(result, expected)

def test_fillna_readonly(self, data_missing):
fill_value = data_missing[1]
result = data_missing.fillna(fill_value, copy=False)
expected = data_missing.fillna(fill_value, copy=True)
tm.assert_extension_array_equal(result, expected)
2 changes: 2 additions & 0 deletions pandas/tests/extension/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ def skip_numpy_object(dtype, request):


class TestNumpyExtensionArray(base.ExtensionTests):
_supports_fillna_copy_false = False

@pytest.mark.skip(reason="We don't register our dtype")
# We don't want to register. This test should probably be split in two.
def test_from_dtype(self, data):
Expand Down
15 changes: 0 additions & 15 deletions pandas/tests/extension/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,6 @@ def test_isna(self, data_missing):
def test_fillna_no_op_returns_copy(self, data, request):
super().test_fillna_no_op_returns_copy(data)

def test_fillna_readonly(self, data_missing):
Comment thread
jbrockmendel marked this conversation as resolved.
# copy keyword is ignored by SparseArray.fillna
# -> copy=True vs False doesn't make a difference
data = data_missing.copy()
data._readonly = True

result = data.fillna(data_missing[1])
assert result[0] == data_missing[1]
tm.assert_extension_array_equal(data, data_missing)

# fillna(copy=False) is ignored -> so same result as above
result = data.fillna(data_missing[1], copy=False)
assert result[0] == data_missing[1]
tm.assert_extension_array_equal(data, data_missing)

@pytest.mark.xfail(reason="Unsupported")
def test_fillna_series(self, data_missing):
# this one looks doable.
Expand Down
Loading