From e18645a857a65d85f611593d7ab803ebc01fde0c Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Fri, 12 Jan 2024 11:42:04 +0100 Subject: [PATCH 1/4] enable a special 3.12 ci job --- .github/workflows/ci.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a4bc61efd42..0159bb75ff2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,7 +42,7 @@ jobs: matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] # Bookend python versions - python-version: ["3.9", "3.11"] + python-version: ["3.9", "3.11", "3.12"] env: [""] include: # Minimum python version: @@ -69,7 +69,11 @@ jobs: if [[ ${{ matrix.os }} == windows* ]] ; then - echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV + if [[ ${{ matrix.python-version }} != "3.12" ]]; then + echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV + else + echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.12.yml" >> $GITHUB_ENV + fi elif [[ "${{ matrix.env }}" != "" ]] ; then if [[ "${{ matrix.env }}" == "flaky" ]] ; @@ -80,7 +84,11 @@ jobs: echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV fi else - echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV + if [[ ${{ matrix.python-version }} != "3.12" ]]; then + echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV + else + echo "CONDA_ENV_FILE=ci/requirements/environment-3.12.yml" >> $GITHUB_ENV + fi fi echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV From b5149c705a0195d294bb1f0a64f799623830947c Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Fri, 12 Jan 2024 11:45:07 +0100 Subject: [PATCH 2/4] add the special environment files --- ci/requirements/environment-3.12.yml | 47 ++++++++++++++++++++ ci/requirements/environment-windows-3.12.yml | 42 +++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 ci/requirements/environment-3.12.yml create mode 100644 ci/requirements/environment-windows-3.12.yml diff --git a/ci/requirements/environment-3.12.yml b/ci/requirements/environment-3.12.yml new file mode 100644 index 00000000000..2fc98d20bb6 --- /dev/null +++ b/ci/requirements/environment-3.12.yml @@ -0,0 +1,47 @@ +name: xarray-tests +channels: + - conda-forge + - nodefaults +dependencies: + - aiobotocore + - boto3 + - bottleneck + - cartopy + - cftime + - dask-core + - distributed + - flox + - fsspec!=2021.7.0 + - h5netcdf + - h5py + - hdf5 + - hypothesis + - iris + - lxml # Optional dep of pydap + - matplotlib-base + - nc-time-axis + - netcdf4 + # - numba + # - numbagg + - numexpr + - numpy + - opt_einsum + - packaging + - pandas + - pint>=0.22 + - pip + - pooch + - pre-commit + - pydap + - pytest + - pytest-cov + - pytest-env + - pytest-xdist + - pytest-timeout + - rasterio + - scipy + - seaborn + # - sparse + - toolz + - typing_extensions + - zarr diff --git a/ci/requirements/environment-windows-3.12.yml b/ci/requirements/environment-windows-3.12.yml new file mode 100644 index 00000000000..3a26c9c16ff --- /dev/null +++ b/ci/requirements/environment-windows-3.12.yml @@ -0,0 +1,42 @@ +name: xarray-tests +channels: + - conda-forge +dependencies: + - boto3 + - bottleneck + - cartopy + - cftime + - dask-core + - distributed + - flox + - fsspec!=2021.7.0 + - h5netcdf + - h5py + - hdf5 + - hypothesis + - iris + - lxml # Optional dep of pydap + - matplotlib-base + - nc-time-axis + - netcdf4 + # - numba + # - numbagg + - numpy + - packaging + - pandas + - pint>=0.22 + - pip + - pre-commit + - pydap + - pytest + - pytest-cov + - pytest-env + - pytest-xdist + - pytest-timeout + - rasterio + - scipy + - seaborn + # - sparse + - toolz + - typing_extensions + - zarr From 7f9971efb85198303533965a6885ca04d830b831 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Fri, 12 Jan 2024 11:48:21 +0100 Subject: [PATCH 3/4] update the trove classifiers --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 3975468d50e..5af618a35bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,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", ] description = "N-D labeled arrays and datasets in Python" From fcfe2f9ca030f502c96c07147d4326f925d1892c Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Wed, 17 Jan 2024 21:37:45 +0100 Subject: [PATCH 4/4] remove `pint` from the 3.12 environment The reason is that `pint` currently does not explicitly define `dtype`, causing our runtime checkable protocols not to match. --- ci/requirements/environment-3.12.yml | 2 +- ci/requirements/environment-windows-3.12.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/requirements/environment-3.12.yml b/ci/requirements/environment-3.12.yml index 2fc98d20bb6..77b531951d9 100644 --- a/ci/requirements/environment-3.12.yml +++ b/ci/requirements/environment-3.12.yml @@ -28,7 +28,7 @@ dependencies: - opt_einsum - packaging - pandas - - pint>=0.22 + # - pint>=0.22 - pip - pooch - pre-commit diff --git a/ci/requirements/environment-windows-3.12.yml b/ci/requirements/environment-windows-3.12.yml index 3a26c9c16ff..a9424d71de2 100644 --- a/ci/requirements/environment-windows-3.12.yml +++ b/ci/requirements/environment-windows-3.12.yml @@ -24,7 +24,7 @@ dependencies: - numpy - packaging - pandas - - pint>=0.22 + # - pint>=0.22 - pip - pre-commit - pydap