diff --git a/.github/workflows/additional.yml b/.github/workflows/additional.yml index 9d598038f61..062f3abf908 100644 --- a/.github/workflows/additional.yml +++ b/.github/workflows/additional.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout source uses: actions/checkout@v4.1.1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 43c4641f8b7..a05016600b5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,13 +24,15 @@ jobs: fail-fast: false matrix: os: ["windows-latest", "ubuntu-latest", "macos-latest"] - environment: ["3.9", "3.10", "3.11"] + environment: ["3.9", "3.10", "3.11", "3.12"] extra: [null] exclude: - os: "macos-latest" environment: "3.9" - os: "macos-latest" environment: "3.10" + - os: "macos-latest" + environment: "3.11" include: # Minimum dependencies - os: "ubuntu-latest" @@ -45,7 +47,7 @@ jobs: environment: "mindeps-optional" # Pyarrow strings turned on - os: "ubuntu-latest" - environment: "3.11" + environment: "3.12" extra: "pyarrow" env: diff --git a/continuous_integration/environment-3.12.yaml b/continuous_integration/environment-3.12.yaml new file mode 100644 index 00000000000..cae467f3816 --- /dev/null +++ b/continuous_integration/environment-3.12.yaml @@ -0,0 +1,79 @@ +# This job includes coverage +name: test-environment +channels: + - conda-forge + - nodefaults +dependencies: + # required dependencies + - python=3.12 + - packaging + - pyyaml + - click + - cloudpickle + - partd + - fsspec + - importlib_metadata + - toolz + # test dependencies + - pre-commit + - pytest + - pytest-cov + - pytest-rerunfailures + - pytest-timeout + - pytest-xdist + - moto + # Optional dependencies + - mimesis + - numpy + - pandas + - flask + - fastparquet>=0.8.0 + - h5py + - pytables + - zarr + # `tiledb-py=0.17.5` lead to strange seg faults in CI, However 0.18 is needed for 3.11 + # https://github.com/dask/dask/pull/9569 + # - tiledb-py # crashes on Python 3.11 + # - pyspark + # - tiledb>=2.5.0 # crashes on Python 3.11 + - xarray + - sqlalchemy>=1.4.16 + - pyarrow>=13 + - coverage + - jsonschema + # # other -- IO + - boto3 + - botocore + - bokeh + - httpretty + - aiohttp + - s3fs + # Need a new `crick` release with support for `numpy=1.24+` + # https://github.com/dask/crick/issues/25 + # - crick + - cytoolz + - distributed + - ipython + - ipycytoscape + # until https://github.com/jupyter-widgets/ipywidgets/issues/3731 is fixed + - ipywidgets<8.0.5 + - ipykernel<6.22.0 + - lz4 + # - numba no support for 3.12 + - psutil + - requests + - scikit-image + - scikit-learn + - scipy + - python-snappy + - sparse + - cachey + - python-graphviz + # Not available on macOS for Python 3.12 yet + # - python-cityhash + - python-xxhash + - mmh3 + - jinja2 + - pip + - pip: + - git+https://github.com/dask/distributed diff --git a/dask/array/tests/test_array_core.py b/dask/array/tests/test_array_core.py index d426390f2e9..4c882bf07bf 100644 --- a/dask/array/tests/test_array_core.py +++ b/dask/array/tests/test_array_core.py @@ -14,6 +14,7 @@ import math import operator import os +import sys import time import warnings from functools import reduce @@ -21,11 +22,13 @@ from operator import add, sub from threading import Lock +from packaging.version import Version from tlz import concat, merge from tlz.curried import identity import dask import dask.array as da +from dask._compatibility import PY_VERSION from dask.array.chunk import getitem from dask.array.core import ( Array, @@ -3910,6 +3913,10 @@ def test_setitem_1d(): dx[index] = 1 +@pytest.mark.xfail( + sys.platform == "win32" and PY_VERSION >= Version("3.12.0"), + reason="https://github.com/dask/dask/issues/10604", +) def test_setitem_hardmask(): x = np.ma.array([1, 2, 3, 4], dtype=int) x.harden_mask() diff --git a/dask/dataframe/tests/test_multi.py b/dask/dataframe/tests/test_multi.py index cd32eec5caf..38b3eed7817 100644 --- a/dask/dataframe/tests/test_multi.py +++ b/dask/dataframe/tests/test_multi.py @@ -5,9 +5,11 @@ import numpy as np import pandas as pd import pytest +from packaging.version import Version from pandas.api.types import is_object_dtype import dask.dataframe as dd +from dask._compatibility import PY_VERSION from dask.base import compute_as_if_collection from dask.dataframe._compat import ( PANDAS_GE_140, @@ -2135,7 +2137,7 @@ def test_concat5(): False, True, marks=pytest.mark.xfail( - PANDAS_GE_220, + PANDAS_GE_220 or PY_VERSION >= Version("3.12.0"), reason="fails on pandas dev: https://github.com/dask/dask/issues/10558", raises=AssertionError, strict=False, @@ -2148,7 +2150,7 @@ def test_concat5(): False, True, marks=pytest.mark.xfail( - PANDAS_GE_220, + PANDAS_GE_220 or PY_VERSION >= Version("3.12.0"), reason="fails on pandas dev: https://github.com/dask/dask/issues/10558", raises=AssertionError, strict=False, diff --git a/pyproject.toml b/pyproject.toml index a6bb32fa741..a576efaa8c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering", "Topic :: System :: Distributed Computing", ]