From 81ef8e0b0bb82c92a1d876031f85099a43520df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Thu, 5 Oct 2023 10:44:04 +0200 Subject: [PATCH] BLD: require Cython 3.0.3 to fix known issues on CPython 3.12 --- .github/workflows/bleeding-edge.yaml | 8 +------- .github/workflows/build-test.yaml | 9 +++++++++ .github/workflows/wheels.yaml | 6 +++--- pyproject.toml | 4 +--- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/bleeding-edge.yaml b/.github/workflows/bleeding-edge.yaml index f6c3759f9e9..18049ef3098 100644 --- a/.github/workflows/bleeding-edge.yaml +++ b/.github/workflows/bleeding-edge.yaml @@ -47,20 +47,14 @@ jobs: # incompatibility with Cython 3 # see https://github.com/yaml/pyyaml/issues/601 # and https://github.com/cython/cython/issues/4568 - # Cython 3.0.2 has a defect on Python 3.12, so we install the -fixed- dev version - # from source for now. - # see https://github.com/cython/cython/issues/5724 - # Cython can be installed from PyPI binaries again when the patch is included - # in a release (likely in version 3.0.3) run: | python -m pip install --upgrade pip python -m pip install --upgrade setuptools wheel python -m pip install --pre --only-binary ":all:" numpy matplotlib \ --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - python -m pip install --pre ewah-bool-utils + python -m pip install --pre ewah-bool-utils Cython python -m pip install git+https://github.com/yt-project/unyt.git python -m pip install --pre pytest PyYAML - python -m pip install git+https://github.com/cython/cython.git - name: Build # --no-build-isolation is used to guarantee that build time dependencies diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index c253df6c702..a3e584c60c2 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -53,6 +53,15 @@ jobs: dependencies: full tests-type: answer test-runner: nose + - os: ubuntu-latest + # minimal tests with Python 3.12 and no optional dependencies + # TODO: when all optional dependencies are compatibles, + # remove this and bump 3.11 -> 3.12 on all arch with 'full' dependencies + # see https://github.com/yt-project/yt/issues/4689 + python-version: '3.12' + dependencies: '' + tests-type: unit + test-runner: pytest runs-on: ${{ matrix.os }} diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index 44d40ec1981..41e5e444c06 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -76,7 +76,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.12' - name: install check-manifest run: | python -m pip install --upgrade pip @@ -86,8 +86,8 @@ jobs: # keep in sync with pyproject.toml run: | - python -m pip install "Cython>=3.0,<3.1" - python -m pip install oldest-supported-numpy + python -m pip install "Cython>=3.0.3, <3.1" + python -m pip install numpy>=1.25 python -m pip install ewah-bool-utils>=1.0.2 python -m pip install --upgrade wheel python -m pip install --upgrade setuptools diff --git a/pyproject.toml b/pyproject.toml index 823254da5e9..e1f2fd3ac47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,9 +5,7 @@ requires = [ # for the upper pin in Cython # see https://github.com/yt-project/yt/issues/4044 - # TODO: bump minimal Cython version to 3.0.3 when released - # see https://github.com/yt-project/yt/issues/4675 - "Cython>=3.0, <3.1", + "Cython>=3.0.3, <3.1", "numpy>=1.25, <2.0", "ewah-bool-utils>=1.0.2", ]