Skip to content

Commit 2c932c7

Browse files
add to at/iat as well
1 parent 36fd337 commit 2c932c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/core/indexing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,8 +2585,8 @@ def __getitem__(self, key):
25852585
return super().__getitem__(key)
25862586

25872587
def __setitem__(self, key, value) -> None:
2588-
if not PYPY:
2589-
if sys.getrefcount(self.obj) <= 2:
2588+
if not PYPY and not WARNING_CHECK_BROKEN:
2589+
if sys.getrefcount(self.obj) <= REF_COUNT:
25902590
warnings.warn(
25912591
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
25922592
)
@@ -2616,8 +2616,8 @@ def _convert_key(self, key):
26162616
return key
26172617

26182618
def __setitem__(self, key, value) -> None:
2619-
if not PYPY:
2620-
if sys.getrefcount(self.obj) <= 2:
2619+
if not PYPY and not WARNING_CHECK_BROKEN:
2620+
if sys.getrefcount(self.obj) <= REF_COUNT:
26212621
warnings.warn(
26222622
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
26232623
)

0 commit comments

Comments
 (0)