File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments