diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 201a02778..7233985bd 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -126,6 +126,9 @@ jobs:
- tox-env: py311-coverage-sbck
python-version: "3.11"
markers: -m 'not slow'
+ - tox-env: py312-coverage-numba
+ python-version: "3.12"
+ markers: -m 'not slow'
- tox-env: notebooks_doctests
python-version: "3.10"
- tox-env: offline-prefetch
@@ -172,7 +175,7 @@ jobs:
test-conda:
needs: lint
- name: test-conda-${{ matrix.tox-env }} (Python${{ matrix.python-version }})
+ name: test-conda-Python${{ matrix.python-version }}
if: |
contains(github.event.pull_request.labels.*.name, 'approved') ||
(github.event.review.state == 'approved') ||
@@ -181,8 +184,8 @@ jobs:
strategy:
matrix:
include:
- - tox-env: py310
- python-version: "3.10"
+ - python-version: "3.9"
+ - python-version: "3.12"
defaults:
run:
shell: bash -l {0}
diff --git a/CHANGES.rst b/CHANGES.rst
index c80832fcf..0a6d038e0 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -8,6 +8,7 @@ Contributors to this version: Juliette Lavoie (:user:`juliettelavoie`), Pascal B
Announcements
^^^^^^^^^^^^^
+* `xclim` now officially supports Python3.12 (requires `numba>=0.59.0`). (:pull:`1613`).
* `xclim` now adheres to the `Semantic Versioning 2.0.0 `_ specification. (:issue:`1556`, :pull:`1569`).
* The `xclim` repository now uses `GitHub Discussions `_ to offer help for users, coordinate translation efforts, and support general Q&A for the `xclim` community. The `xclim` `Gitter` room has been deprecated in favour of GitHub Discussions. (:issue:`1571`, :pull:`1572`).
diff --git a/environment.yml b/environment.yml
index 04ae0e482..3ce0cefa9 100644
--- a/environment.yml
+++ b/environment.yml
@@ -1,78 +1,79 @@
name: xclim
channels:
- - conda-forge
- - defaults
+ - numba # Added to gain access to Python3.12-compatible numba release candidates.
+ - conda-forge
+ - defaults
dependencies:
- - python >=3.8
- - astroid
- - boltons >=20.1
- - bottleneck >=1.3.1
- - cf_xarray >=0.6.1
- - cftime >=1.4.1
- - Click >=8.1
- - dask >=2.6.0
- - importlib-resources # For Python3.8
- - jsonpickle
- - lmoments3
- - numba
- - numpy >=1.16
- - pandas >=0.23,<2.2
- - pint >=0.9
- - poppler >=0.67
- - pyyaml
- - scikit-learn >=0.21.3
- - scipy >=1.2
- - statsmodels
- - xarray >=2022.06.0,<2023.11.0
- - yamale
- # Extras
- - eofs
- - flox
+ - python >=3.8
+ - astroid
+ - boltons >=20.1
+ - bottleneck >=1.3.1
+ - cf_xarray >=0.6.1
+ - cftime >=1.4.1
+ - Click >=8.1
+ - dask >=2.6.0
+ - importlib-resources # For Python3.8
+ - jsonpickle
+ - lmoments3
+ - numba
+ - numpy >=1.16
+ - pandas >=0.23,<2.2
+ - pint >=0.9
+ - poppler >=0.67
+ - pyyaml
+ - scikit-learn >=0.21.3
+ - scipy >=1.2
+ - statsmodels
+ - xarray >=2022.06.0,<2023.11.0
+ - yamale
+ # Extras
+ - eofs
+ - flox
# Testing and development dependencies
- - black >=22.12
- - blackdoc
- - bump-my-version
- - cairosvg
- - codespell
- - coverage
- - distributed >=2.0
- - filelock
- - flake8
- - flake8-rst-docstrings
- - flit
- - h5netcdf
- - ipykernel
- - ipython
- - matplotlib
- - mypy
- - nbqa
- - nbsphinx
- - nbval
- - nc-time-axis
- - netCDF4 >=1.4
- - notebook
- - platformdirs
- - pooch
- - pre-commit
- - pybtex
- - pylint
- - pytest
- - pytest-cov
- - pytest-socket
- - pytest-xdist >=3.2
- - ruff >=0.1.0
- - sphinx
- - sphinx-autodoc-typehints
- - sphinx-codeautolink
- - sphinx-copybutton
- - sphinx_rtd_theme >=1.0
- - sphinxcontrib-bibtex
- - tokenize-rt
- - tox
-# - tox-conda # Will be added when a tox@v4.0+ compatible plugin is released.
- - xdoctest
- - yamllint
- - pip
- - pip:
- - flake8-alphabetize
- - sphinxcontrib-svg2pdfconverter
+ - black >=22.12
+ - blackdoc
+ - bump-my-version
+ - cairosvg
+ - codespell
+ - coverage
+ - distributed >=2.0
+ - filelock
+ - flake8
+ - flake8-rst-docstrings
+ - flit
+ - h5netcdf
+ - ipykernel
+ - ipython
+ - matplotlib
+ - mypy
+ - nbqa
+ - nbsphinx
+ - nbval
+ - nc-time-axis
+ - netCDF4 >=1.4
+ - notebook
+ - platformdirs
+ - pooch
+ - pre-commit
+ - pybtex
+ - pylint
+ - pytest
+ - pytest-cov
+ - pytest-socket
+ - pytest-xdist >=3.2
+ - ruff >=0.1.0
+ - sphinx
+ - sphinx-autodoc-typehints
+ - sphinx-codeautolink
+ - sphinx-copybutton
+ - sphinx-rtd-theme >=1.0
+ - sphinxcontrib-bibtex
+ - tokenize-rt
+ - tox
+# - tox-conda # Will be added when a tox@v4.0+ compatible plugin is released.
+ - xdoctest
+ - yamllint
+ - pip
+ - pip:
+ - flake8-alphabetize
+ - sphinxcontrib-svg2pdfconverter
diff --git a/pyproject.toml b/pyproject.toml
index 7b822c8ec..855f13943 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -27,6 +27,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 :: Atmospheric Science"
]
dynamic = ["description", "version"]
diff --git a/tox.ini b/tox.ini
index 3017f8de9..1c0692cf5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,6 +10,7 @@ env_list =
py39-upstream-doctest
py310
py311
+ py312-numba
labels =
test = py38, py39-upstream-doctest, py310, py311, notebooks_doctests, offline-prefetch
requires =
@@ -103,6 +104,12 @@ passenv =
extras = dev
deps =
py38: scipy<1.9
+ # FIXME: Remove when Python3.8 is dropped
+ py38: numba<0.59.0
+ py38: llvmlite<0.42.0
+ # FIXME: Remove when numba 0.59.0 is released
+ numba: numba==0.59.0rc1
+ numba: llvmlite==0.42.0rc1
coverage: coveralls
upstream: -rrequirements_upstream.txt
eofs: eofs