From 091940cee54891ae3676a61f9fedf37b6e5cc36c Mon Sep 17 00:00:00 2001 From: crusaderky Date: Fri, 13 Feb 2026 12:12:49 +0000 Subject: [PATCH] 3.14t support --- .github/workflows/tests.yaml | 27 ++++++++- continuous_integration/environment-3.14t.yaml | 56 +++++++++++++++++++ pyproject.toml | 1 + 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 continuous_integration/environment-3.14t.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 866d75858a..b68f1f5ab2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -26,7 +26,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - environment: [mindeps, "3.10", "3.11", "3.12", "3.13", "3.14"] + environment: [mindeps, "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] label: [default] extra_packages: [null] # Cherry-pick test modules to split the overall runtime roughly in half @@ -44,6 +44,8 @@ jobs: environment: "3.12" - os: macos-latest environment: "3.13" + - os: macos-latest + environment: "3.14t" - os: windows-latest environment: mindeps @@ -180,6 +182,29 @@ jobs: shell: bash -l {0} run: conda install -y ${{ join(matrix.extra_packages, ' ') }} + - name: Disable msgpack C extension on free-threading + # FIXME https://github.com/msgpack/msgpack-python/issues/613 + # The msgpack C module does not contain any race conditions in free-threading, + # but does not release the GIL. So we need to either install the (slower) + # pure-python variant or we need to run the test suite with PYTHON_GIL=0. + # The former approach has the benefit of proving that msgpack is the only offender. + if: ${{ matrix.environment == '3.14t' }} + shell: bash -l {0} + run: | + conda uninstall -y -v --force msgpack-python + MSGPACK_PUREPYTHON=1 python -m pip install msgpack --no-binary msgpack --no-cache --force-reinstall -v + python -Werror -c 'import msgpack' + + - name: Uninstall brotli on free-threading + # brotli is an optional dependency of urllib3, but it is pulled in + # by the urllib3 conda package. + # brotli does not release the GIL, so we need to uninstall it now. + if: ${{ matrix.environment == '3.14t' }} + shell: bash -l {0} + run: | + conda uninstall -y -v --force brotli-python + python -Werror -c 'import urllib3' + - name: Install shell: bash -l {0} run: | diff --git a/continuous_integration/environment-3.14t.yaml b/continuous_integration/environment-3.14t.yaml new file mode 100644 index 0000000000..427248cebe --- /dev/null +++ b/continuous_integration/environment-3.14t.yaml @@ -0,0 +1,56 @@ +name: dask-distributed +channels: + - conda-forge +dependencies: + - python-freethreading=3.14 + - packaging + - pip + - asyncssh + - bokeh>3 + - click + - cloudpickle + - coverage + - dask # overridden by git tip below; pulls in optional dependencies + - fsspec # overridden by git tip below + # - gilknocker # Makes no sense in free-threading + - h5py + # - ipykernel # No 3.14t build for Windows yet + - ipywidgets + - jinja2 + - jupyter_events + # - jupyter-server-proxy # No ipykernel 3.14t for Windows yet + # - jupyterlab # No ipykernel 3.14t for Windows yet + - locket + # FIXME https://github.com/msgpack/msgpack-python/issues/613 + # tests.yml replaces this with a pure-python variant. + - msgpack-python + - netcdf4 + - paramiko + - pre-commit + - prometheus_client + - psutil + - pyarrow + - pytest + - pytest-cov + - pytest-faulthandler + - pytest-repeat + - pytest-rerunfailures + - pytest-timeout + # FIXME requests depends on urllib3, which in turn (only in conda) installs optional + # dependency brotli, which does not release the GIL. + # tests.yaml force-uninstalls brotli to work around this. + - requests + - scikit-learn + - scipy + - setproctitle + - sortedcollections + - tblib + - toolz + - tornado + - zict # overridden by git tip below + - zstandard + - pip: + - git+https://github.com/dask/dask + - git+https://github.com/dask/zict + - git+https://github.com/fsspec/filesystem_spec + - keras diff --git a/pyproject.toml b/pyproject.toml index 7070490d7f..4263e7a518 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: Free Threading :: 1 - Unstable", "Topic :: Scientific/Engineering", "Topic :: System :: Distributed Computing", ]