Skip to content

Commit 814ee7b

Browse files
committed
MAINT: disable the warning on 3.14 and newer
1 parent 534e1a9 commit 814ee7b

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
@@ -4213,7 +4213,7 @@ def isetitem(self, loc, value) -> None:
42134213
self._iset_item_mgr(loc, arraylike, inplace=False, refs=refs)
42144214

42154215
def __setitem__(self, key, value) -> None:
4216-
if not PYPY:
4216+
if not PYPY and sys.version_info < (3, 14):
42174217
if sys.getrefcount(self) <= 3:
42184218
warnings.warn(
42194219
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
@@ -9113,7 +9113,7 @@ def update(
91139113
1 2 500.0
91149114
2 3 6.0
91159115
"""
9116-
if not PYPY:
9116+
if not PYPY and sys.version_info < (3, 14):
91179117
if sys.getrefcount(self) <= REF_COUNT:
91189118
warnings.warn(
91199119
_chained_assignment_method_msg,

pandas/core/generic.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7046,7 +7046,7 @@ def fillna(
70467046
"""
70477047
inplace = validate_bool_kwarg(inplace, "inplace")
70487048
if inplace:
7049-
if not PYPY:
7049+
if not PYPY and sys.version_info < (3, 14):
70507050
if sys.getrefcount(self) <= REF_COUNT:
70517051
warnings.warn(
70527052
_chained_assignment_method_msg,
@@ -7277,7 +7277,7 @@ def ffill(
72777277
"""
72787278
inplace = validate_bool_kwarg(inplace, "inplace")
72797279
if inplace:
7280-
if not PYPY:
7280+
if not PYPY and sys.version_info < (3, 14):
72817281
if sys.getrefcount(self) <= REF_COUNT:
72827282
warnings.warn(
72837283
_chained_assignment_method_msg,
@@ -7417,7 +7417,7 @@ def bfill(
74177417
"""
74187418
inplace = validate_bool_kwarg(inplace, "inplace")
74197419
if inplace:
7420-
if not PYPY:
7420+
if not PYPY and sys.version_info < (3, 14):
74217421
if sys.getrefcount(self) <= REF_COUNT:
74227422
warnings.warn(
74237423
_chained_assignment_method_msg,
@@ -7502,7 +7502,7 @@ def replace(
75027502

75037503
inplace = validate_bool_kwarg(inplace, "inplace")
75047504
if inplace:
7505-
if not PYPY:
7505+
if not PYPY and sys.version_info < (3, 14):
75067506
if sys.getrefcount(self) <= REF_COUNT:
75077507
warnings.warn(
75087508
_chained_assignment_method_msg,
@@ -7865,7 +7865,7 @@ def interpolate(
78657865
inplace = validate_bool_kwarg(inplace, "inplace")
78667866

78677867
if inplace:
7868-
if not PYPY:
7868+
if not PYPY and sys.version_info < (3, 14):
78697869
if sys.getrefcount(self) <= REF_COUNT:
78707870
warnings.warn(
78717871
_chained_assignment_method_msg,
@@ -8449,7 +8449,7 @@ def clip(
84498449
inplace = validate_bool_kwarg(inplace, "inplace")
84508450

84518451
if inplace:
8452-
if not PYPY:
8452+
if not PYPY and sys.version_info < (3, 14):
84538453
if sys.getrefcount(self) <= REF_COUNT:
84548454
warnings.warn(
84558455
_chained_assignment_method_msg,
@@ -10032,7 +10032,7 @@ def where(
1003210032
"""
1003310033
inplace = validate_bool_kwarg(inplace, "inplace")
1003410034
if inplace:
10035-
if not PYPY:
10035+
if not PYPY and sys.version_info < (3, 14):
1003610036
if sys.getrefcount(self) <= REF_COUNT:
1003710037
warnings.warn(
1003810038
_chained_assignment_method_msg,
@@ -10096,7 +10096,7 @@ def mask(
1009610096
) -> Self | None:
1009710097
inplace = validate_bool_kwarg(inplace, "inplace")
1009810098
if inplace:
10099-
if not PYPY:
10099+
if not PYPY and sys.version_info < (3, 14):
1010010100
if sys.getrefcount(self) <= REF_COUNT:
1010110101
warnings.warn(
1010210102
_chained_assignment_method_msg,

pandas/core/indexing.py

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

898898
@final
899899
def __setitem__(self, key, value) -> None:
900-
if not PYPY:
900+
if not PYPY and sys.version_info < (3, 14):
901901
if sys.getrefcount(self.obj) <= 2:
902902
warnings.warn(
903903
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2

pandas/core/series.py

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

10591059
def __setitem__(self, key, value) -> None:
1060-
if not PYPY:
1060+
if not PYPY and sys.version_info < (3, 14):
10611061
if sys.getrefcount(self) <= 3:
10621062
warnings.warn(
10631063
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
@@ -3336,7 +3336,7 @@ def update(self, other: Series | Sequence | Mapping) -> None:
33363336
2 3
33373337
dtype: int64
33383338
"""
3339-
if not PYPY:
3339+
if not PYPY and sys.version_info < (3, 14):
33403340
if sys.getrefcount(self) <= REF_COUNT:
33413341
warnings.warn(
33423342
_chained_assignment_method_msg,

0 commit comments

Comments
 (0)