From 787a6a3394b7d53317a16788cfc4235d7a39ee3c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 28 Feb 2024 17:03:29 -0600 Subject: [PATCH] Add support for Python 3.11, require NumPy 1.23+ (#350) Contributes to https://github.com/rapidsai/build-planning/issues/3 This PR adds support for Python 3.11. It also bumps uses of `NumPy` to `numpy>=1.23`, see https://github.com/rapidsai/build-planning/issues/3#issuecomment-1967952280. ## Notes for Reviewers This is part of ongoing work to add Python 3.11 support across RAPIDS. The Python 3.11 CI workflows introduced in https://github.com/rapidsai/shared-workflows/pull/176 are *optional*... they are not yet required to run successfully for PRs to be merged. This PR can be merged once all jobs are running successfully (including the non-required jobs for Python 3.11). The CI logs should be verified that the jobs are building and testing with Python 3.11. See https://github.com/rapidsai/shared-workflows/pull/176 for more details. Authors: - James Lamb (https://github.com/jameslamb) - Bradley Dice (https://github.com/bdice) Approvers: - Kyle Edwards (https://github.com/KyleFromNVIDIA) - Mads R. B. Kristensen (https://github.com/madsbk) - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) URL: https://github.com/rapidsai/kvikio/pull/350 --- conda/environments/all_cuda-118_arch-x86_64.yaml | 4 ++-- conda/environments/all_cuda-122_arch-x86_64.yaml | 4 ++-- conda/recipes/kvikio/meta.yaml | 2 +- cpp/doxygen/main_page.md | 4 ++-- dependencies.yaml | 8 ++++++-- docs/source/install.rst | 8 ++++---- python/pyproject.toml | 3 ++- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index a6cf11b3cb..1dbc7d9979 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -21,7 +21,7 @@ dependencies: - libcufile=1.4.0.31 - ninja - numcodecs <0.12.0 -- numpy>=1.21 +- numpy>=1.23 - numpydoc - nvcc_linux-64=11.8 - nvcomp==3.0.6 @@ -29,7 +29,7 @@ dependencies: - pre-commit - pytest - pytest-cov -- python>=3.9,<3.11 +- python>=3.9,<3.12 - scikit-build-core>=0.7.0 - sphinx - sphinx-click diff --git a/conda/environments/all_cuda-122_arch-x86_64.yaml b/conda/environments/all_cuda-122_arch-x86_64.yaml index bdda38edbb..d6225f9a5c 100644 --- a/conda/environments/all_cuda-122_arch-x86_64.yaml +++ b/conda/environments/all_cuda-122_arch-x86_64.yaml @@ -20,14 +20,14 @@ dependencies: - libcufile-dev - ninja - numcodecs <0.12.0 -- numpy>=1.21 +- numpy>=1.23 - numpydoc - nvcomp==3.0.6 - packaging - pre-commit - pytest - pytest-cov -- python>=3.9,<3.11 +- python>=3.9,<3.12 - scikit-build-core>=0.7.0 - sphinx - sphinx-click diff --git a/conda/recipes/kvikio/meta.yaml b/conda/recipes/kvikio/meta.yaml index fa19eb7333..b66be590f1 100644 --- a/conda/recipes/kvikio/meta.yaml +++ b/conda/recipes/kvikio/meta.yaml @@ -69,7 +69,7 @@ requirements: - libkvikio ={{ version }} run: - python - - numpy >=1.20 + - numpy >=1.23 - cupy >=12.0.0 - zarr # See https://github.com/zarr-developers/numcodecs/pull/475 diff --git a/cpp/doxygen/main_page.md b/cpp/doxygen/main_page.md index e03c87b5d9..5de65f9fc9 100644 --- a/cpp/doxygen/main_page.md +++ b/cpp/doxygen/main_page.md @@ -47,9 +47,9 @@ Install the **nightly release** from the ``rapidsai-nightly`` channel with the f # Install in existing environment mamba install -c rapidsai-nightly -c conda-forge libkvikio # Create new environment (CUDA 11.8) -mamba create -n libkvikio-env -c rapidsai-nightly -c conda-forge python=3.10 cuda-version=11.8 libkvikio +mamba create -n libkvikio-env -c rapidsai-nightly -c conda-forge python=3.11 cuda-version=11.8 libkvikio # Create new environment (CUDA 12.0) -mamba create -n libkvikio-env -c rapidsai-nightly -c conda-forge python=3.10 cuda-version=12.0 libkvikio +mamba create -n libkvikio-env -c rapidsai-nightly -c conda-forge python=3.11 cuda-version=12.0 libkvikio ``` --- diff --git a/dependencies.yaml b/dependencies.yaml index 1013d86517..323ede320d 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -232,13 +232,17 @@ dependencies: packages: - python=3.10 - matrix: + py: "3.11" packages: - - python>=3.9,<3.11 + - python=3.11 + - matrix: + packages: + - python>=3.9,<3.12 run: common: - output_types: [conda, requirements, pyproject] packages: - - numpy>=1.21 + - numpy>=1.23 - zarr # See https://github.com/zarr-developers/numcodecs/pull/475 - numcodecs <0.12.0 diff --git a/docs/source/install.rst b/docs/source/install.rst index c6f11a7a93..d9d9a9ba4a 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -16,9 +16,9 @@ Install the **stable release** from the ``rapidsai`` channel like: # Install in existing environment mamba install -c rapidsai -c conda-forge kvikio # Create new environment (CUDA 11.8) - mamba create -n kvikio-env -c rapidsai -c conda-forge python=3.10 cuda-version=11.8 kvikio + mamba create -n kvikio-env -c rapidsai -c conda-forge python=3.11 cuda-version=11.8 kvikio # Create new environment (CUDA 12.0) - mamba create -n kvikio-env -c rapidsai -c conda-forge python=3.10 cuda-version=12.0 kvikio + mamba create -n kvikio-env -c rapidsai -c conda-forge python=3.11 cuda-version=12.0 kvikio Install the **nightly release** from the ``rapidsai-nightly`` channel like: @@ -27,9 +27,9 @@ Install the **nightly release** from the ``rapidsai-nightly`` channel like: # Install in existing environment mamba install -c rapidsai-nightly -c conda-forge kvikio # Create new environment (CUDA 11.8) - mamba create -n kvikio-env -c rapidsai-nightly -c conda-forge python=3.10 cuda-version=11.8 kvikio + mamba create -n kvikio-env -c rapidsai-nightly -c conda-forge python=3.11 cuda-version=11.8 kvikio # Create new environment (CUDA 12.0) - mamba create -n kvikio-env -c rapidsai-nightly -c conda-forge python=3.10 cuda-version=12.0 kvikio + mamba create -n kvikio-env -c rapidsai-nightly -c conda-forge python=3.11 cuda-version=12.0 kvikio .. note:: diff --git a/python/pyproject.toml b/python/pyproject.toml index 9a5bf46ce9..5a4644c1d3 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -23,7 +23,7 @@ requires-python = ">=3.9" dependencies = [ "cupy-cuda11x>=12.0.0", "numcodecs <0.12.0", - "numpy>=1.21", + "numpy>=1.23", "packaging", "zarr", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. @@ -35,6 +35,7 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] [project.optional-dependencies]