|
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 REF_COUNT, WARNING_CHECK_BROKEN |
87 | 87 | from pandas.compat._optional import import_optional_dependency |
88 | 88 | from pandas.compat.numpy import function as nv |
89 | 89 | from pandas.errors import ( |
@@ -7069,7 +7069,7 @@ def fillna( |
7069 | 7069 | """ |
7070 | 7070 | inplace = validate_bool_kwarg(inplace, "inplace") |
7071 | 7071 | if inplace: |
7072 | | - if not PYPY and sys.version_info < (3, 14): |
| 7072 | + if not PYPY and WARNING_CHECK_BROKEN: |
7073 | 7073 | if sys.getrefcount(self) <= REF_COUNT: |
7074 | 7074 | warnings.warn( |
7075 | 7075 | _chained_assignment_method_msg, |
@@ -7300,7 +7300,7 @@ def ffill( |
7300 | 7300 | """ |
7301 | 7301 | inplace = validate_bool_kwarg(inplace, "inplace") |
7302 | 7302 | if inplace: |
7303 | | - if not PYPY and sys.version_info < (3, 14): |
| 7303 | + if not PYPY and WARNING_CHECK_BROKEN: |
7304 | 7304 | if sys.getrefcount(self) <= REF_COUNT: |
7305 | 7305 | warnings.warn( |
7306 | 7306 | _chained_assignment_method_msg, |
@@ -7440,7 +7440,7 @@ def bfill( |
7440 | 7440 | """ |
7441 | 7441 | inplace = validate_bool_kwarg(inplace, "inplace") |
7442 | 7442 | if inplace: |
7443 | | - if not PYPY and sys.version_info < (3, 14): |
| 7443 | + if not PYPY and WARNING_CHECK_BROKEN: |
7444 | 7444 | if sys.getrefcount(self) <= REF_COUNT: |
7445 | 7445 | warnings.warn( |
7446 | 7446 | _chained_assignment_method_msg, |
@@ -7525,7 +7525,7 @@ def replace( |
7525 | 7525 |
|
7526 | 7526 | inplace = validate_bool_kwarg(inplace, "inplace") |
7527 | 7527 | if inplace: |
7528 | | - if not PYPY and sys.version_info < (3, 14): |
| 7528 | + if not PYPY and WARNING_CHECK_BROKEN: |
7529 | 7529 | if sys.getrefcount(self) <= REF_COUNT: |
7530 | 7530 | warnings.warn( |
7531 | 7531 | _chained_assignment_method_msg, |
@@ -7888,7 +7888,7 @@ def interpolate( |
7888 | 7888 | inplace = validate_bool_kwarg(inplace, "inplace") |
7889 | 7889 |
|
7890 | 7890 | if inplace: |
7891 | | - if not PYPY and sys.version_info < (3, 14): |
| 7891 | + if not PYPY and WARNING_CHECK_BROKEN: |
7892 | 7892 | if sys.getrefcount(self) <= REF_COUNT: |
7893 | 7893 | warnings.warn( |
7894 | 7894 | _chained_assignment_method_msg, |
@@ -8472,7 +8472,7 @@ def clip( |
8472 | 8472 | inplace = validate_bool_kwarg(inplace, "inplace") |
8473 | 8473 |
|
8474 | 8474 | if inplace: |
8475 | | - if not PYPY and sys.version_info < (3, 14): |
| 8475 | + if not PYPY and WARNING_CHECK_BROKEN: |
8476 | 8476 | if sys.getrefcount(self) <= REF_COUNT: |
8477 | 8477 | warnings.warn( |
8478 | 8478 | _chained_assignment_method_msg, |
@@ -10081,7 +10081,7 @@ def where( |
10081 | 10081 | """ |
10082 | 10082 | inplace = validate_bool_kwarg(inplace, "inplace") |
10083 | 10083 | if inplace: |
10084 | | - if not PYPY and sys.version_info < (3, 14): |
| 10084 | + if not PYPY and WARNING_CHECK_BROKEN: |
10085 | 10085 | if sys.getrefcount(self) <= REF_COUNT: |
10086 | 10086 | warnings.warn( |
10087 | 10087 | _chained_assignment_method_msg, |
@@ -10145,7 +10145,7 @@ def mask( |
10145 | 10145 | ) -> Self | None: |
10146 | 10146 | inplace = validate_bool_kwarg(inplace, "inplace") |
10147 | 10147 | if inplace: |
10148 | | - if not PYPY and sys.version_info < (3, 14): |
| 10148 | + if not PYPY and WARNING_CHECK_BROKEN: |
10149 | 10149 | if sys.getrefcount(self) <= REF_COUNT: |
10150 | 10150 | warnings.warn( |
10151 | 10151 | _chained_assignment_method_msg, |
|
0 commit comments