Skip to content

Commit 30ed65b

Browse files
committed
MAINT: disable the warning on 3.14 and newer
1 parent 6c89e6f commit 30ed65b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

pandas/core/frame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4296,7 +4296,7 @@ def __setitem__(self, key, value) -> None:
42964296
z 3 50
42974297
# Values for 'a' and 'b' are completely ignored!
42984298
"""
4299-
if not PYPY:
4299+
if not PYPY and sys.version_info < (3, 14):
43004300
if sys.getrefcount(self) <= 3:
43014301
warnings.warn(
43024302
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
@@ -9204,7 +9204,7 @@ def update(
92049204
1 2 500.0
92059205
2 3 6.0
92069206
"""
9207-
if not PYPY:
9207+
if not PYPY and sys.version_info < (3, 14):
92089208
if sys.getrefcount(self) <= REF_COUNT:
92099209
warnings.warn(
92109210
_chained_assignment_method_msg,

pandas/core/generic.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7069,7 +7069,7 @@ def fillna(
70697069
"""
70707070
inplace = validate_bool_kwarg(inplace, "inplace")
70717071
if inplace:
7072-
if not PYPY:
7072+
if not PYPY and sys.version_info < (3, 14):
70737073
if sys.getrefcount(self) <= REF_COUNT:
70747074
warnings.warn(
70757075
_chained_assignment_method_msg,
@@ -7300,7 +7300,7 @@ def ffill(
73007300
"""
73017301
inplace = validate_bool_kwarg(inplace, "inplace")
73027302
if inplace:
7303-
if not PYPY:
7303+
if not PYPY and sys.version_info < (3, 14):
73047304
if sys.getrefcount(self) <= REF_COUNT:
73057305
warnings.warn(
73067306
_chained_assignment_method_msg,
@@ -7440,7 +7440,7 @@ def bfill(
74407440
"""
74417441
inplace = validate_bool_kwarg(inplace, "inplace")
74427442
if inplace:
7443-
if not PYPY:
7443+
if not PYPY and sys.version_info < (3, 14):
74447444
if sys.getrefcount(self) <= REF_COUNT:
74457445
warnings.warn(
74467446
_chained_assignment_method_msg,
@@ -7525,7 +7525,7 @@ def replace(
75257525

75267526
inplace = validate_bool_kwarg(inplace, "inplace")
75277527
if inplace:
7528-
if not PYPY:
7528+
if not PYPY and sys.version_info < (3, 14):
75297529
if sys.getrefcount(self) <= REF_COUNT:
75307530
warnings.warn(
75317531
_chained_assignment_method_msg,
@@ -7888,7 +7888,7 @@ def interpolate(
78887888
inplace = validate_bool_kwarg(inplace, "inplace")
78897889

78907890
if inplace:
7891-
if not PYPY:
7891+
if not PYPY and sys.version_info < (3, 14):
78927892
if sys.getrefcount(self) <= REF_COUNT:
78937893
warnings.warn(
78947894
_chained_assignment_method_msg,
@@ -8472,7 +8472,7 @@ def clip(
84728472
inplace = validate_bool_kwarg(inplace, "inplace")
84738473

84748474
if inplace:
8475-
if not PYPY:
8475+
if not PYPY and sys.version_info < (3, 14):
84768476
if sys.getrefcount(self) <= REF_COUNT:
84778477
warnings.warn(
84788478
_chained_assignment_method_msg,
@@ -10081,7 +10081,7 @@ def where(
1008110081
"""
1008210082
inplace = validate_bool_kwarg(inplace, "inplace")
1008310083
if inplace:
10084-
if not PYPY:
10084+
if not PYPY and sys.version_info < (3, 14):
1008510085
if sys.getrefcount(self) <= REF_COUNT:
1008610086
warnings.warn(
1008710087
_chained_assignment_method_msg,
@@ -10145,7 +10145,7 @@ def mask(
1014510145
) -> Self | None:
1014610146
inplace = validate_bool_kwarg(inplace, "inplace")
1014710147
if inplace:
10148-
if not PYPY:
10148+
if not PYPY and sys.version_info < (3, 14):
1014910149
if sys.getrefcount(self) <= REF_COUNT:
1015010150
warnings.warn(
1015110151
_chained_assignment_method_msg,

pandas/core/indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ def _ensure_listlike_indexer(self, key, axis=None, value=None) -> None:
913913

914914
@final
915915
def __setitem__(self, key, value) -> None:
916-
if not PYPY:
916+
if not PYPY and sys.version_info < (3, 14):
917917
if sys.getrefcount(self.obj) <= 2:
918918
warnings.warn(
919919
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2

pandas/core/series.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ def _get_value(self, label, takeable: bool = False):
10591059
return self.iloc[loc]
10601060

10611061
def __setitem__(self, key, value) -> None:
1062-
if not PYPY:
1062+
if not PYPY and sys.version_info < (3, 14):
10631063
if sys.getrefcount(self) <= 3:
10641064
warnings.warn(
10651065
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
@@ -3338,7 +3338,7 @@ def update(self, other: Series | Sequence | Mapping) -> None:
33383338
2 3
33393339
dtype: int64
33403340
"""
3341-
if not PYPY:
3341+
if not PYPY and sys.version_info < (3, 14):
33423342
if sys.getrefcount(self) <= REF_COUNT:
33433343
warnings.warn(
33443344
_chained_assignment_method_msg,

0 commit comments

Comments
 (0)