File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ from numpy cimport (
2323cnp.import_array()
2424
2525from pandas._libs.algos import ensure_int64
26- from pandas.compat import PYPY
26+ from pandas.compat import CHAINED_WARNING_DISABLED
2727from pandas.errors import ChainedAssignmentError
2828from pandas.errors.cow import _chained_assignment_msg
2929
@@ -1032,7 +1032,7 @@ cdef class SetitemMixin:
10321032
10331033 def __setitem__ (self , key , value ) -> None:
10341034 cdef bint is_unique = 0
1035- if not PYPY :
1035+ if not CHAINED_WARNING_DISABLED :
10361036 is_unique = _is_unique_referenced_temporary(self )
10371037 if is_unique:
10381038 warnings.warn(
Original file line number Diff line number Diff line change 1919WASM = (sys .platform == "emscripten" ) or (platform .machine () in ["wasm32" , "wasm64" ])
2020ISMUSL = "musl" in (sysconfig .get_config_var ("HOST_GNU_TYPE" ) or "" )
2121REF_COUNT = 2
22- CHAINED_WARNING_DISABLED = PYPY
22+ CHAINED_WARNING_DISABLED = PYPY or ( PY314 and not sys . _is_gil_enabled ())
2323CHAINED_WARNING_DISABLED_INPLACE_METHOD = PYPY or PY314
2424
2525
Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ def _get_literal_string_prefix_len(token_string: str) -> int:
9595 return 0
9696
9797
98- PRIVATE_FUNCTIONS_ALLOWED = {"sys._getframe" } # no known alternative
98+ PRIVATE_FUNCTIONS_ALLOWED = {
99+ "sys._getframe" ,
100+ "sys._is_gil_enabled" ,
101+ } # no known alternative
99102
100103
101104def private_function_across_module (file_obj : IO [str ]) -> Iterable [tuple [int , str ]]:
You can’t perform that action at this time.
0 commit comments