File tree Expand file tree Collapse file tree 6 files changed +19
-2
lines changed Expand file tree Collapse file tree 6 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ jobs:
387387 - name : Build Environment
388388 run : |
389389 python --version
390- python -m pip install --upgrade pip setuptools wheel numpy==2.1 meson[ninja]==1.2.1 meson-python==0.13.1
390+ python -m pip install --upgrade pip setuptools wheel numpy meson[ninja]==1.2.1 meson-python==0.13.1
391391 python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
392392 python -m pip install versioneer[toml]
393393 python -m pip install python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
Original file line number Diff line number Diff line change 1717
1818from pandas .compat ._constants import (
1919 IS64 ,
20+ IS_FREE_THREADING ,
2021 ISMUSL ,
2122 PY311 ,
2223 PY312 ,
24+ PY313 ,
2325 PYPY ,
2426 WASM ,
2527)
@@ -153,8 +155,10 @@ def is_ci_environment() -> bool:
153155 "HAS_PYARROW" ,
154156 "IS64" ,
155157 "ISMUSL" ,
158+ "IS_FREE_THREADING" ,
156159 "PY311" ,
157160 "PY312" ,
161+ "PY313" ,
158162 "PYPY" ,
159163 "WASM" ,
160164 "is_numpy_dev" ,
Original file line number Diff line number Diff line change 1515
1616PY311 = sys .version_info >= (3 , 11 )
1717PY312 = sys .version_info >= (3 , 12 )
18+ PY313 = sys .version_info >= (3 , 13 )
1819PYPY = platform .python_implementation () == "PyPy"
1920WASM = (sys .platform == "emscripten" ) or (platform .machine () in ["wasm32" , "wasm64" ])
21+ IS_FREE_THREADING = False if not PY313 else sys ._is_gil_enabled ()
2022ISMUSL = "musl" in (sysconfig .get_config_var ("HOST_GNU_TYPE" ) or "" )
2123REF_COUNT = 2 if PY311 else 3
2224
2325__all__ = [
2426 "IS64" ,
2527 "ISMUSL" ,
28+ "IS_FREE_THREADING" ,
2629 "PY311" ,
2730 "PY312" ,
31+ "PY313" ,
2832 "PYPY" ,
2933 "WASM" ,
3034]
Original file line number Diff line number Diff line change 1313np_version_gte1p24p3 = _nlv >= Version ("1.24.3" )
1414np_version_gte1p25 = _nlv >= Version ("1.25" )
1515np_version_gt2 = _nlv >= Version ("2.0.0" )
16+ np_version_gt2p2 = _nlv >= Version ("2.2.0" )
1617is_numpy_dev = _nlv .dev is not None
1718_min_numpy_ver = "1.23.5"
1819
Original file line number Diff line number Diff line change 11import numpy as np
22import pytest
33
4+ from pandas .compat import IS_FREE_THREADING
5+ from pandas .compat .numpy import np_version_gt2p2
6+
47from pandas import (
58 Categorical ,
69 DataFrame ,
@@ -45,6 +48,10 @@ def test_replace(replace_kwargs):
4548 tm .assert_frame_equal (df , df_orig )
4649
4750
51+ @pytest .mark .skipif (
52+ IS_FREE_THREADING and np_version_gt2p2 ,
53+ reason = "Segfaults in array_algos.replace.replace_regex" ,
54+ )
4855def test_replace_regex_inplace_refs ():
4956 df = DataFrame ({"a" : ["aaa" , "bbb" ]})
5057 df_orig = df .copy ()
Original file line number Diff line number Diff line change @@ -89,7 +89,8 @@ def _get_literal_string_prefix_len(token_string: str) -> int:
8989 return 0
9090
9191
92- PRIVATE_FUNCTIONS_ALLOWED = {"sys._getframe" } # no known alternative
92+ # no known alternative
93+ PRIVATE_FUNCTIONS_ALLOWED = {"sys._getframe" , "sys._is_gil_enabled" }
9394
9495
9596def private_function_across_module (file_obj : IO [str ]) -> Iterable [tuple [int , str ]]:
You can’t perform that action at this time.
0 commit comments