|
83 | 83 | npt,
|
84 | 84 | )
|
85 | 85 | from pandas.compat import PYPY
|
86 | | -from pandas.compat._constants import REF_COUNT |
| 86 | +from pandas.compat._constants import ( |
| 87 | + REF_COUNT, |
| 88 | + WARNING_CHECK_DISABLED, |
| 89 | +) |
87 | 90 | from pandas.compat._optional import import_optional_dependency
|
88 | 91 | from pandas.compat.numpy import function as nv
|
89 | 92 | from pandas.errors import (
|
@@ -7070,7 +7073,7 @@ def fillna(
|
7070 | 7073 | """
|
7071 | 7074 | inplace = validate_bool_kwarg(inplace, "inplace")
|
7072 | 7075 | if inplace:
|
7073 | | - if not PYPY: |
| 7076 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
7074 | 7077 | if sys.getrefcount(self) <= REF_COUNT:
|
7075 | 7078 | warnings.warn(
|
7076 | 7079 | _chained_assignment_method_msg,
|
@@ -7301,7 +7304,7 @@ def ffill(
|
7301 | 7304 | """
|
7302 | 7305 | inplace = validate_bool_kwarg(inplace, "inplace")
|
7303 | 7306 | if inplace:
|
7304 | | - if not PYPY: |
| 7307 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
7305 | 7308 | if sys.getrefcount(self) <= REF_COUNT:
|
7306 | 7309 | warnings.warn(
|
7307 | 7310 | _chained_assignment_method_msg,
|
@@ -7441,7 +7444,7 @@ def bfill(
|
7441 | 7444 | """
|
7442 | 7445 | inplace = validate_bool_kwarg(inplace, "inplace")
|
7443 | 7446 | if inplace:
|
7444 | | - if not PYPY: |
| 7447 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
7445 | 7448 | if sys.getrefcount(self) <= REF_COUNT:
|
7446 | 7449 | warnings.warn(
|
7447 | 7450 | _chained_assignment_method_msg,
|
@@ -7526,7 +7529,7 @@ def replace(
|
7526 | 7529 |
|
7527 | 7530 | inplace = validate_bool_kwarg(inplace, "inplace")
|
7528 | 7531 | if inplace:
|
7529 | | - if not PYPY: |
| 7532 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
7530 | 7533 | if sys.getrefcount(self) <= REF_COUNT:
|
7531 | 7534 | warnings.warn(
|
7532 | 7535 | _chained_assignment_method_msg,
|
@@ -7889,7 +7892,7 @@ def interpolate(
|
7889 | 7892 | inplace = validate_bool_kwarg(inplace, "inplace")
|
7890 | 7893 |
|
7891 | 7894 | if inplace:
|
7892 | | - if not PYPY: |
| 7895 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
7893 | 7896 | if sys.getrefcount(self) <= REF_COUNT:
|
7894 | 7897 | warnings.warn(
|
7895 | 7898 | _chained_assignment_method_msg,
|
@@ -8473,7 +8476,7 @@ def clip(
|
8473 | 8476 | inplace = validate_bool_kwarg(inplace, "inplace")
|
8474 | 8477 |
|
8475 | 8478 | if inplace:
|
8476 | | - if not PYPY: |
| 8479 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
8477 | 8480 | if sys.getrefcount(self) <= REF_COUNT:
|
8478 | 8481 | warnings.warn(
|
8479 | 8482 | _chained_assignment_method_msg,
|
@@ -10083,7 +10086,7 @@ def where(
|
10083 | 10086 | """
|
10084 | 10087 | inplace = validate_bool_kwarg(inplace, "inplace")
|
10085 | 10088 | if inplace:
|
10086 | | - if not PYPY: |
| 10089 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
10087 | 10090 | if sys.getrefcount(self) <= REF_COUNT:
|
10088 | 10091 | warnings.warn(
|
10089 | 10092 | _chained_assignment_method_msg,
|
@@ -10147,7 +10150,7 @@ def mask(
|
10147 | 10150 | ) -> Self | None:
|
10148 | 10151 | inplace = validate_bool_kwarg(inplace, "inplace")
|
10149 | 10152 | if inplace:
|
10150 | | - if not PYPY: |
| 10153 | + if not PYPYandnotWARNING_CHECK_DISABLED: |
10151 | 10154 | if sys.getrefcount(self) <= REF_COUNT:
|
10152 | 10155 | warnings.warn(
|
10153 | 10156 | _chained_assignment_method_msg,
|
|
0 commit comments