Skip to content

Commit 95772a4

Browse files
disabled -> broken
1 parent 6447f00 commit 95772a4

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

pandas/_testing/contexts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from pandas.compat import (
1616
PYPY,
17-
WARNING_CHECK_BROKEN,
17+
WARNING_CHECK_DISABLED,
1818
)
1919
from pandas.errors import ChainedAssignmentError
2020

@@ -166,7 +166,7 @@ def with_csv_dialect(name: str, **kwargs) -> Generator[None]:
166166
def raises_chained_assignment_error(extra_warnings=(), extra_match=()):
167167
from pandas._testing import assert_produces_warning
168168

169-
if PYPY or WARNING_CHECK_BROKEN:
169+
if PYPY or WARNING_CHECK_DISABLED:
170170
if not extra_warnings:
171171
from contextlib import nullcontext
172172

pandas/compat/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
PY312,
2222
PY314,
2323
PYPY,
24-
WARNING_CHECK_BROKEN,
24+
WARNING_CHECK_DISABLED,
2525
WASM,
2626
)
2727
from pandas.compat.numpy import is_numpy_dev
@@ -159,7 +159,7 @@ def is_ci_environment() -> bool:
159159
"PY314",
160160
"PYARROW_MIN_VERSION",
161161
"PYPY",
162-
"WARNING_CHECK_BROKEN",
162+
"WARNING_CHECK_DISABLED",
163163
"WASM",
164164
"is_numpy_dev",
165165
"pa_version_under14p0",

pandas/compat/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
WASM = (sys.platform == "emscripten") or (platform.machine() in ["wasm32", "wasm64"])
2020
ISMUSL = "musl" in (sysconfig.get_config_var("HOST_GNU_TYPE") or "")
2121
REF_COUNT = 2
22-
WARNING_CHECK_BROKEN = PY314
22+
WARNING_CHECK_DISABLED = PY314
2323

2424

2525
__all__ = [

pandas/core/frame.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from pandas.compat import PYPY
5353
from pandas.compat._constants import (
5454
REF_COUNT,
55-
WARNING_CHECK_BROKEN,
55+
WARNING_CHECK_DISABLED,
5656
)
5757
from pandas.compat._optional import import_optional_dependency
5858
from pandas.compat.numpy import function as nv
@@ -4299,7 +4299,7 @@ def __setitem__(self, key, value) -> None:
42994299
z 3 50
43004300
# Values for 'a' and 'b' are completely ignored!
43014301
"""
4302-
if not PYPY and not WARNING_CHECK_BROKEN:
4302+
if not PYPY and not WARNING_CHECK_DISABLED:
43034303
if sys.getrefcount(self) <= REF_COUNT + 1:
43044304
warnings.warn(
43054305
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
@@ -9214,7 +9214,7 @@ def update(
92149214
1 2 500.0
92159215
2 3 6.0
92169216
"""
9217-
if not PYPY and not WARNING_CHECK_BROKEN:
9217+
if not PYPY and not WARNING_CHECK_DISABLED:
92189218
if sys.getrefcount(self) <= REF_COUNT:
92199219
warnings.warn(
92209220
_chained_assignment_method_msg,

pandas/core/generic.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
from pandas.compat import PYPY
8686
from pandas.compat._constants import (
8787
REF_COUNT,
88-
WARNING_CHECK_BROKEN,
88+
WARNING_CHECK_DISABLED,
8989
)
9090
from pandas.compat._optional import import_optional_dependency
9191
from pandas.compat.numpy import function as nv
@@ -7073,7 +7073,7 @@ def fillna(
70737073
"""
70747074
inplace = validate_bool_kwarg(inplace, "inplace")
70757075
if inplace:
7076-
if not PYPY and not WARNING_CHECK_BROKEN:
7076+
if not PYPY and not WARNING_CHECK_DISABLED:
70777077
if sys.getrefcount(self) <= REF_COUNT:
70787078
warnings.warn(
70797079
_chained_assignment_method_msg,
@@ -7304,7 +7304,7 @@ def ffill(
73047304
"""
73057305
inplace = validate_bool_kwarg(inplace, "inplace")
73067306
if inplace:
7307-
if not PYPY and not WARNING_CHECK_BROKEN:
7307+
if not PYPY and not WARNING_CHECK_DISABLED:
73087308
if sys.getrefcount(self) <= REF_COUNT:
73097309
warnings.warn(
73107310
_chained_assignment_method_msg,
@@ -7444,7 +7444,7 @@ def bfill(
74447444
"""
74457445
inplace = validate_bool_kwarg(inplace, "inplace")
74467446
if inplace:
7447-
if not PYPY and not WARNING_CHECK_BROKEN:
7447+
if not PYPY and not WARNING_CHECK_DISABLED:
74487448
if sys.getrefcount(self) <= REF_COUNT:
74497449
warnings.warn(
74507450
_chained_assignment_method_msg,
@@ -7529,7 +7529,7 @@ def replace(
75297529

75307530
inplace = validate_bool_kwarg(inplace, "inplace")
75317531
if inplace:
7532-
if not PYPY and not WARNING_CHECK_BROKEN:
7532+
if not PYPY and not WARNING_CHECK_DISABLED:
75337533
if sys.getrefcount(self) <= REF_COUNT:
75347534
warnings.warn(
75357535
_chained_assignment_method_msg,
@@ -7892,7 +7892,7 @@ def interpolate(
78927892
inplace = validate_bool_kwarg(inplace, "inplace")
78937893

78947894
if inplace:
7895-
if not PYPY and not WARNING_CHECK_BROKEN:
7895+
if not PYPY and not WARNING_CHECK_DISABLED:
78967896
if sys.getrefcount(self) <= REF_COUNT:
78977897
warnings.warn(
78987898
_chained_assignment_method_msg,
@@ -8476,7 +8476,7 @@ def clip(
84768476
inplace = validate_bool_kwarg(inplace, "inplace")
84778477

84788478
if inplace:
8479-
if not PYPY and not WARNING_CHECK_BROKEN:
8479+
if not PYPY and not WARNING_CHECK_DISABLED:
84808480
if sys.getrefcount(self) <= REF_COUNT:
84818481
warnings.warn(
84828482
_chained_assignment_method_msg,
@@ -10086,7 +10086,7 @@ def where(
1008610086
"""
1008710087
inplace = validate_bool_kwarg(inplace, "inplace")
1008810088
if inplace:
10089-
if not PYPY and not WARNING_CHECK_BROKEN:
10089+
if not PYPY and not WARNING_CHECK_DISABLED:
1009010090
if sys.getrefcount(self) <= REF_COUNT:
1009110091
warnings.warn(
1009210092
_chained_assignment_method_msg,
@@ -10150,7 +10150,7 @@ def mask(
1015010150
) -> Self | None:
1015110151
inplace = validate_bool_kwarg(inplace, "inplace")
1015210152
if inplace:
10153-
if not PYPY and not WARNING_CHECK_BROKEN:
10153+
if not PYPY and not WARNING_CHECK_DISABLED:
1015410154
if sys.getrefcount(self) <= REF_COUNT:
1015510155
warnings.warn(
1015610156
_chained_assignment_method_msg,

pandas/core/indexing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from pandas.compat import PYPY
1919
from pandas.compat._constants import (
2020
REF_COUNT,
21-
WARNING_CHECK_BROKEN,
21+
WARNING_CHECK_DISABLED,
2222
)
2323
from pandas.errors import (
2424
AbstractMethodError,
@@ -917,7 +917,7 @@ def _ensure_listlike_indexer(self, key, axis=None, value=None) -> None:
917917

918918
@final
919919
def __setitem__(self, key, value) -> None:
920-
if not PYPY and not WARNING_CHECK_BROKEN:
920+
if not PYPY and not WARNING_CHECK_DISABLED:
921921
if sys.getrefcount(self.obj) <= REF_COUNT:
922922
warnings.warn(
923923
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
@@ -2585,7 +2585,7 @@ def __getitem__(self, key):
25852585
return super().__getitem__(key)
25862586

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

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

pandas/core/series.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from pandas.compat import PYPY
3838
from pandas.compat._constants import (
3939
REF_COUNT,
40-
WARNING_CHECK_BROKEN,
40+
WARNING_CHECK_DISABLED,
4141
)
4242
from pandas.compat._optional import import_optional_dependency
4343
from pandas.compat.numpy import function as nv
@@ -1058,7 +1058,7 @@ def _get_value(self, label, takeable: bool = False):
10581058
return self.iloc[loc]
10591059

10601060
def __setitem__(self, key, value) -> None:
1061-
if not PYPY and not WARNING_CHECK_BROKEN:
1061+
if not PYPY and not WARNING_CHECK_DISABLED:
10621062
if sys.getrefcount(self) <= REF_COUNT + 1:
10631063
warnings.warn(
10641064
_chained_assignment_msg, ChainedAssignmentError, stacklevel=2
@@ -3339,7 +3339,7 @@ def update(self, other: Series | Sequence | Mapping) -> None:
33393339
2 3
33403340
dtype: int64
33413341
"""
3342-
if not PYPY and not WARNING_CHECK_BROKEN:
3342+
if not PYPY and not WARNING_CHECK_DISABLED:
33433343
if sys.getrefcount(self) <= REF_COUNT:
33443344
warnings.warn(
33453345
_chained_assignment_method_msg,

pandas/tests/copy_view/test_chained_assignment_deprecation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import pytest
33

4-
from pandas.compat import WARNING_CHECK_BROKEN
4+
from pandas.compat import WARNING_CHECK_DISABLED
55
from pandas.errors import ChainedAssignmentError
66

77
from pandas import DataFrame
@@ -18,7 +18,7 @@ def test_series_setitem(indexer):
1818

1919
# using custom check instead of tm.assert_produces_warning because that doesn't
2020
# fail if multiple warnings are raised
21-
if WARNING_CHECK_BROKEN:
21+
if WARNING_CHECK_DISABLED:
2222
return
2323
with pytest.warns() as record: # noqa: TID251
2424
df["a"][indexer] = 0

0 commit comments

Comments
 (0)