From 07db76b966020b26b636e5fd94b79b8b04b440ab Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 10 Jul 2024 21:16:03 -0400 Subject: [PATCH 1/5] CI: Add 3.13-nogil build --- .github/workflows/test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b3d9f249..2b453e890 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,9 +125,9 @@ jobs: - os: ubuntu-latest python-version: 3.8 dependencies: 'min' - # NumPy 2.0 + # NoGIL - os: ubuntu-latest - python-version: '3.12' + python-version: '3.13-dev' dependencies: 'dev' exclude: # x86 for Windows + Python<3.12 @@ -168,11 +168,18 @@ jobs: submodules: recursive fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} + if: "!endsWith(matrix.python-version, '-dev')" uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} allow-prereleases: true + - name: Set up Python ${{ matrix.python-version }} + if: endsWith(matrix.python-version, '-dev') + uses: deadsnakes/action@v3.1.0 + with: + python-version: ${{ matrix.python-version }} + nogil: true - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Install tox From 6efd41a7279de2488aa857518e3ab30e8a8ff6d4 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 10 Jul 2024 21:17:24 -0400 Subject: [PATCH 2/5] TOX: Add a Python 3.13 environment --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index b9ac9557c..02de7a7e0 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ envlist = # x64-only range py312-{full,pre}-x64 # Special environment for numpy 2.0-dev testing - py312-dev-x64 + py313-dev-x64 install doctest style @@ -31,6 +31,7 @@ python = 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 [gh-actions:env] DEPENDS = From cb73d1c6dfcd0e8ca93011125cf507c85987f1ad Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 10 Jul 2024 21:26:42 -0400 Subject: [PATCH 3/5] TOX: Drop h5py and indexed_gzip dependencies for dev Allow pillow and matplotlib to be built from sdist in dev environments. --- tox.ini | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 02de7a7e0..5b4dcc017 100644 --- a/tox.ini +++ b/tox.ini @@ -51,7 +51,8 @@ description = Pytest with coverage labels = test install_command = python -I -m pip install -v \ - --only-binary numpy,scipy,h5py,pillow,matplotlib \ + dev: --only-binary numpy,scipy,h5py \ + !dev: --only-binary numpy,scipy,h5py,pillow,matplotlib \ pre,dev: --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ {opts} {packages} pip_pre = @@ -90,15 +91,15 @@ deps = # Numpy 2.0 is a major breaking release; we cannot put much effort into # supporting until it's at least RC stable pre: numpy <2.0.dev0 - dev: numpy >=2.0.dev0 + dev: numpy >=2.1.dev0 # Scipy stopped producing win32 wheels at py310 py3{8,9}-full-x86,x64,arm64: scipy >=1.6 # Matplotlib depends on scipy, so cannot be built for py310 on x86 py3{8,9}-full-x86,x64,arm64: matplotlib >=3.4 # h5py stopped producing win32 wheels at py39 - py38-full-x86,x64,arm64: h5py >=2.10 + py38-full-x86,{full,pre}-{x64,arm64}: h5py >=2.10 full,pre,dev: pillow >=8.1 - full,pre,dev: indexed_gzip >=1.4 + full,pre: indexed_gzip >=1.4 full,pre,dev: pyzstd >=0.14.3 full,pre: pydicom >=2.1 dev: pydicom @ git+https://github.com/pydicom/pydicom.git@main From a14ead51ccb8ff3da9603e5ca0002857de18ae6d Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 10 Jul 2024 22:01:49 -0400 Subject: [PATCH 4/5] CI: Run tox in debug to see what files are downloaded --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b453e890..05718dc1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -189,7 +189,7 @@ jobs: - name: Show tox config run: tox c - name: Run tox - run: tox -v --exit-and-dump-after 1200 + run: tox -vv --exit-and-dump-after 1200 - uses: codecov/codecov-action@v4 if: ${{ always() }} with: From 880e13e3dcd30b077762e1c8b46ce76496bd28b8 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 10 Jul 2024 22:08:41 -0400 Subject: [PATCH 5/5] TOX: Add PYTHON_GIL=0 to py313 environments --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 5b4dcc017..5df35c8d3 100644 --- a/tox.ini +++ b/tox.ini @@ -71,6 +71,8 @@ pass_env = NO_COLOR CLICOLOR CLICOLOR_FORCE +set_env = + py313: PYTHON_GIL=0 extras = test deps = # General minimum dependencies: pin based on API usage