Skip to content

Commit 27f2af3

Browse files
authored
MNT Use PYTHON_GIL=0 only at test time to avoid interference with conda (#31341)
1 parent 13d00dc commit 27f2af3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

azure-pipelines.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ jobs:
8484
)
8585
matrix:
8686
pylatest_free_threaded:
87-
PYTHON_GIL: '0'
8887
DISTRIB: 'conda-free-threaded'
8988
LOCK_FILE: './build_tools/azure/pylatest_free_threaded_linux-64_conda.lock'
9089
COVERAGE: 'false'

build_tools/azure/test_script.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ else
7575
echo "Could not inspect CPU architecture."
7676
fi
7777

78+
if [[ "$DISTRIB" == "conda-free-threaded" ]]; then
79+
# Make sure that GIL is disabled even when importing extensions that have
80+
# not declared free-threaded compatibility. This can be removed when numpy,
81+
# scipy and scikit-learn extensions all have declared free-threaded
82+
# compatibility.
83+
export PYTHON_GIL=0
84+
fi
85+
7886
TEST_CMD="$TEST_CMD --pyargs sklearn"
7987

8088
set -x

0 commit comments

Comments
 (0)