diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6bc200c3dc..b1de8bc77e 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 13c970c87e..f98b51d72a 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 976ea2fb5c..c62e3ff4f1 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 7627ef70c7..b8ccb0fc27 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 8112cc2c0e..1b56813bb3 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 3dea58af26..aa770da895 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 0000000000..43f9ddf783 --- /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 8ae7581d72..0dd2f4208f 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", ]