From 66e7de424e42ea672ed7d4ad18f51c99941b35d8 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 23 Jan 2023 13:05:27 +0100 Subject: [PATCH 1/4] add new environment files for python 3.11 These should be deleted after all the remaining dependencies (cdms2, numba, numbagg, sparse) support python 3.11. --- ci/requirements/environment-py311.yml | 48 +++++++++++++++++++ ci/requirements/environment-windows-py311.yml | 44 +++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 ci/requirements/environment-py311.yml create mode 100644 ci/requirements/environment-windows-py311.yml diff --git a/ci/requirements/environment-py311.yml b/ci/requirements/environment-py311.yml new file mode 100644 index 00000000000..e23fa44c683 --- /dev/null +++ b/ci/requirements/environment-py311.yml @@ -0,0 +1,48 @@ +name: xarray-tests +channels: + - conda-forge + - nodefaults +dependencies: + - aiobotocore + - boto3 + - bottleneck + - cartopy + # - cdms2 + - cfgrib + - 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 + - packaging + - pandas + - pint + - pip + - pooch + - pre-commit + - pseudonetcdf + - pydap + - pytest + - pytest-cov + - pytest-env + - pytest-xdist + - rasterio + - scipy + - seaborn + # - sparse + - toolz + - typing_extensions + - zarr diff --git a/ci/requirements/environment-windows-py311.yml b/ci/requirements/environment-windows-py311.yml new file mode 100644 index 00000000000..3fc207dc609 --- /dev/null +++ b/ci/requirements/environment-windows-py311.yml @@ -0,0 +1,44 @@ +name: xarray-tests +channels: + - conda-forge +dependencies: + - boto3 + - bottleneck + - cartopy + # - cdms2 # Not available on Windows + # - cfgrib # Causes Python interpreter crash on Windows: https://github.com/pydata/xarray/pull/3340 + - 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 + - pip + - pre-commit + - pseudonetcdf + - pydap + - pytest + - pytest-cov + - pytest-env + - pytest-xdist + - rasterio + - scipy + - seaborn + # - sparse + - toolz + - typing_extensions + - zarr From aa1ca109e025a86f46fccf8002f082e2c4e58f27 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 23 Jan 2023 13:09:13 +0100 Subject: [PATCH 2/4] enable python 3.11 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ab4b8f0c26a..27e3f25623b 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.8", "3.10"] + python-version: ["3.8", "3.10", "3.11"] env: [""] include: # Minimum python version: From 45be3ede8df962a8c844a5e4f708a7f7f13aa2c5 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 23 Jan 2023 13:09:19 +0100 Subject: [PATCH 3/4] use the special environment files for python 3.11 --- .github/workflows/ci.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 27e3f25623b..2d190efc14c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,7 +67,13 @@ jobs: run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - if [[ ${{ matrix.os }} == windows* ]] ; + if [[ "${{matrix.python-version}}" == "3.11" ]]; then + if [[ ${{matrix.os}} == windows* ]]; then + echo "CONDA_ENV_FILE=ci/requirements/environment-windows-py311.yml" >> $GITHUB_ENV + else + echo "CONDA_ENV_FILE=ci/requirements/environment-py311.yml" >> $GITHUB_ENV + fi + elif [[ ${{ matrix.os }} == windows* ]] ; then echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV elif [[ "${{ matrix.env }}" != "" ]] ; From 4ef24b5b89ce6122c3e1a48ea960fb6d5d27836e Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 23 Jan 2023 13:43:41 +0100 Subject: [PATCH 4/4] officially support `python=3.11` --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 7919908e8ec..70b810307be 100644 --- a/setup.cfg +++ b/setup.cfg @@ -67,6 +67,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: Scientific/Engineering [options]