From 61698587d22014a99c22b4f63f12fe900028b843 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Fri, 13 Feb 2026 12:12:49 +0000 Subject: [PATCH 1/4] 3.14t support --- .github/workflows/tests.yaml | 17 +++- continuous_integration/environment-3.10.yaml | 2 +- continuous_integration/environment-3.11.yaml | 2 +- continuous_integration/environment-3.12.yaml | 2 +- continuous_integration/environment-3.13.yaml | 4 +- continuous_integration/environment-3.14.yaml | 4 +- continuous_integration/environment-3.14t.yaml | 79 +++++++++++++++++++ pyproject.toml | 1 + 8 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 continuous_integration/environment-3.14t.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2aa9f94282e..80d5f2c756c 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 @@ -168,6 +170,19 @@ jobs: || steps.cache.outputs.cache-hit != 'true' ) + - 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: Install shell: bash -l {0} run: | diff --git a/continuous_integration/environment-3.10.yaml b/continuous_integration/environment-3.10.yaml index f3914e8ae9a..4ab79b4bda1 100644 --- a/continuous_integration/environment-3.10.yaml +++ b/continuous_integration/environment-3.10.yaml @@ -13,7 +13,7 @@ dependencies: - cloudpickle - coverage - cython # Only tested here; also a dependency of crick - - dask # overridden by git tip below + - dask # overridden by git tip below; pulls in optional dependencies - fsspec - gilknocker - h5py diff --git a/continuous_integration/environment-3.11.yaml b/continuous_integration/environment-3.11.yaml index 256999899d1..e611e21dc3d 100644 --- a/continuous_integration/environment-3.11.yaml +++ b/continuous_integration/environment-3.11.yaml @@ -11,7 +11,7 @@ dependencies: - click - cloudpickle - coverage - - dask # overridden by git tip below + - dask # overridden by git tip below; pulls in optional dependencies - fsspec # overridden by git tip below - gilknocker - h5py diff --git a/continuous_integration/environment-3.12.yaml b/continuous_integration/environment-3.12.yaml index e33c82a30e9..6c8a15708cb 100644 --- a/continuous_integration/environment-3.12.yaml +++ b/continuous_integration/environment-3.12.yaml @@ -11,7 +11,7 @@ dependencies: - click - cloudpickle - coverage - - dask # overridden by git tip below + - dask # overridden by git tip below; pulls in optional dependencies - fsspec # overridden by git tip below - gilknocker - h5py diff --git a/continuous_integration/environment-3.13.yaml b/continuous_integration/environment-3.13.yaml index 3e22fa4b466..f50495ffd44 100644 --- a/continuous_integration/environment-3.13.yaml +++ b/continuous_integration/environment-3.13.yaml @@ -1,4 +1,4 @@ -name: dask-distributed-313 +name: dask-distributed channels: - conda-forge dependencies: @@ -10,7 +10,7 @@ dependencies: - click - cloudpickle - coverage - - dask # overridden by git tip below + - dask # overridden by git tip below; pulls in optional dependencies - fsspec # overridden by git tip below - gilknocker - h5py diff --git a/continuous_integration/environment-3.14.yaml b/continuous_integration/environment-3.14.yaml index b39f35c9d08..7156631a4b3 100644 --- a/continuous_integration/environment-3.14.yaml +++ b/continuous_integration/environment-3.14.yaml @@ -1,4 +1,4 @@ -name: dask-distributed-313 +name: dask-distributed channels: - conda-forge dependencies: @@ -10,7 +10,7 @@ dependencies: - click - cloudpickle - coverage - - dask # overridden by git tip below + - dask # overridden by git tip below; pulls in optional dependencies - fsspec # overridden by git tip below - gilknocker - h5py diff --git a/continuous_integration/environment-3.14t.yaml b/continuous_integration/environment-3.14t.yaml new file mode 100644 index 00000000000..43f9ddf783e --- /dev/null +++ b/continuous_integration/environment-3.14t.yaml @@ -0,0 +1,79 @@ +name: dask-distributed +channels: + - conda-forge +dependencies: + - python-freethreading=3.14 + - packaging + - pip + - asyncssh + - bokeh>3 + - click + - cloudpickle + - coverage + # conda variant of dask depends on cytoolz, which is not available + # on conda yet. Manually install dask dependencies from conda below. + # - dask # overridden by git tip below; pulls in optional dependencies + - fsspec # overridden by git tip below + # - gilknocker # Makes no sense in free-threading + # - h5py # Not available for 3.14t + # - ipykernel # Not available for 3.14t + - ipywidgets + - jinja2 + - jupyter_events + # - jupyter-server-proxy # Not available for 3.14t + # - jupyterlab # Not available for 3.14t + - locket + # FIXME https://github.com/msgpack/msgpack-python/issues/613 + # Install placeholder to prevent distributed below from compiling the C extension from + # sources. tests.yml will replace 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 + - requests + - scikit-learn + - scipy + - sortedcollections + - tblib + - toolz + - tornado + - zict # overridden by git tip below + - zstandard + + ##### 3.14t temporary hacks + # packages normally pulled in by the `dask` conda package + - dask-core + # - cytoolz # conda package for 3.14t not yet available; installed via pip below + - lz4 + - numpy + - pandas>=3 # Actually need >=3.0.1 due to severe race conditions in 3.0 + # (https://github.com/pandas-dev/pandas/pull/63783) + # Until 3.0.1 is released, this is temporarily overridden + # by pandas git below. + - pyarrow + - bokeh + - jinja2 + - pyyaml + - sortedcontainers + - urllib3 + ##### end 3.14t hacks + + - pip: + - git+https://github.com/dask/dask + - git+https://github.com/dask/zict + - git+https://github.com/fsspec/filesystem_spec + - keras + + ##### 3.14t temporary hacks + - cytoolz # conda package for 3.14t not yet available + - git+https://github.com/pandas-dev/pandas.git@3.0.x # Need pandas 3.0.1 + ##### end 3.14t hacks diff --git a/pyproject.toml b/pyproject.toml index 280c04923cd..c6652eee21c 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", ] From e48a573c661e3e9fb33e1c0c8738adb66b556da4 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Tue, 28 Apr 2026 16:08:32 +0100 Subject: [PATCH 2/4] Remove environment hacks --- continuous_integration/environment-3.14t.yaml | 40 ++++--------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/continuous_integration/environment-3.14t.yaml b/continuous_integration/environment-3.14t.yaml index 43f9ddf783e..e4da9f8ecb6 100644 --- a/continuous_integration/environment-3.14t.yaml +++ b/continuous_integration/environment-3.14t.yaml @@ -10,22 +10,19 @@ dependencies: - click - cloudpickle - coverage - # conda variant of dask depends on cytoolz, which is not available - # on conda yet. Manually install dask dependencies from conda below. - # - dask # overridden by git tip below; pulls in optional dependencies + - dask # overridden by git tip below; pulls in optional dependencies - fsspec # overridden by git tip below # - gilknocker # Makes no sense in free-threading - # - h5py # Not available for 3.14t - # - ipykernel # Not available for 3.14t + - h5py + - ipykernel - ipywidgets - jinja2 - jupyter_events - # - jupyter-server-proxy # Not available for 3.14t - # - jupyterlab # Not available for 3.14t + - jupyter-server-proxy + - jupyterlab - locket # FIXME https://github.com/msgpack/msgpack-python/issues/613 - # Install placeholder to prevent distributed below from compiling the C extension from - # sources. tests.yml will replace this with a pure-python variant. + # tests.yml replaces this with a pure-python variant. - msgpack-python - netcdf4 - paramiko @@ -42,38 +39,15 @@ dependencies: - requests - scikit-learn - scipy + - setproctitle - sortedcollections - tblib - toolz - tornado - zict # overridden by git tip below - zstandard - - ##### 3.14t temporary hacks - # packages normally pulled in by the `dask` conda package - - dask-core - # - cytoolz # conda package for 3.14t not yet available; installed via pip below - - lz4 - - numpy - - pandas>=3 # Actually need >=3.0.1 due to severe race conditions in 3.0 - # (https://github.com/pandas-dev/pandas/pull/63783) - # Until 3.0.1 is released, this is temporarily overridden - # by pandas git below. - - pyarrow - - bokeh - - jinja2 - - pyyaml - - sortedcontainers - - urllib3 - ##### end 3.14t hacks - - pip: - git+https://github.com/dask/dask - git+https://github.com/dask/zict - git+https://github.com/fsspec/filesystem_spec - keras - - ##### 3.14t temporary hacks - - cytoolz # conda package for 3.14t not yet available - - git+https://github.com/pandas-dev/pandas.git@3.0.x # Need pandas 3.0.1 - ##### end 3.14t hacks From 9ecc9fabc440f1c7deafea1eff087002e2fa1e36 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Tue, 28 Apr 2026 17:38:08 +0100 Subject: [PATCH 3/4] revert --- continuous_integration/environment-3.14t.yaml | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/continuous_integration/environment-3.14t.yaml b/continuous_integration/environment-3.14t.yaml index e4da9f8ecb6..89c1825cf8d 100644 --- a/continuous_integration/environment-3.14t.yaml +++ b/continuous_integration/environment-3.14t.yaml @@ -10,7 +10,11 @@ dependencies: - click - cloudpickle - coverage - - dask # overridden by git tip below; pulls in optional dependencies + # This pulls in a dependency chain (specific to conda) + # dask -> distributed -> urllib3 -> brotli + # and brotli does not release the GIL. + # Manually install dask dependencies from conda below. + # - dask # overridden by git tip below; pulls in optional dependencies - fsspec # overridden by git tip below # - gilknocker # Makes no sense in free-threading - h5py @@ -46,6 +50,23 @@ dependencies: - tornado - zict # overridden by git tip below - zstandard + + ##### 3.14t temporary hacks + # packages normally pulled in by the `dask` conda package + - dask-core + - cytoolz + - lz4 + - numpy + - pandas >=3.0.1 + - pyarrow + - bokeh + - jinja2 + - pyyaml + - sortedcontainers + # Uniquely used by preload. Depends on brotli, which does not release the GIL + # - urllib3 + ##### end 3.14t hacks + - pip: - git+https://github.com/dask/dask - git+https://github.com/dask/zict From 056ada75246d356f82c74ef7f128482f8ee58304 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Tue, 28 Apr 2026 17:40:35 +0100 Subject: [PATCH 4/4] revert --- continuous_integration/environment-3.14t.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/continuous_integration/environment-3.14t.yaml b/continuous_integration/environment-3.14t.yaml index 89c1825cf8d..5a31183a7d0 100644 --- a/continuous_integration/environment-3.14t.yaml +++ b/continuous_integration/environment-3.14t.yaml @@ -18,12 +18,12 @@ dependencies: - fsspec # overridden by git tip below # - gilknocker # Makes no sense in free-threading - h5py - - ipykernel + # - ipykernel # No 3.14t for Windows yet - ipywidgets - jinja2 - jupyter_events - - jupyter-server-proxy - - jupyterlab + # - 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.