From 34e3a44e627b6143876c7c35830067fc5a18a3b7 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Wed, 24 Dec 2025 07:48:56 -0800 Subject: [PATCH 01/11] include free-threaded 3.14 wheels --- .github/workflows/cibuildwheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index eaf0861b7..886f03b65 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -79,7 +79,7 @@ jobs: # These needs to rotate every new Python release. run: | set -x - echo "CIBW_BUILD=cp310-* cp311-* cp314-*" >> $GITHUB_ENV + echo "CIBW_BUILD=cp310-* cp311-* cp314-* cp314t-*" >> $GITHUB_ENV set +x if: ${{ github.event_name }} == "pull_request" @@ -170,7 +170,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ARM64 - CIBW_SKIP: "cp310-* cp314t-*" + CIBW_SKIP: "cp310-* - uses: actions/upload-artifact@v6 with: From f426c4f36f9ab4e31dd9ae5ea1656b62237b137e Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:18:33 -0700 Subject: [PATCH 02/11] try to fix stubtest errors --- test/test_masked2.py | 2 +- test/test_masked3.py | 2 +- test/test_masked4.py | 2 +- test/test_masked5.py | 2 +- test/test_masked6.py | 2 +- test/test_scaled.py | 2 +- test/test_types.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/test_masked2.py b/test/test_masked2.py index 249f2e9ac..71bab907a 100755 --- a/test/test_masked2.py +++ b/test/test_masked2.py @@ -64,7 +64,7 @@ def setUp(self): v = f.createVariable('v',np.float32,'x',zlib=True,least_significant_digit=1) # assign masked array to that variable with one missing value. data =\ - ma.array([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_)) + ma.MaskedArray([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_)) data.mask[1]=True v[:] = data f.close() diff --git a/test/test_masked3.py b/test/test_masked3.py index c7cd4f2f5..2c2ff3043 100755 --- a/test/test_masked3.py +++ b/test/test_masked3.py @@ -19,7 +19,7 @@ def setUp(self): self.fillval = default_fillvals["i2"] self.v = np.array([self.fillval, 5, 4, -9999], dtype = "i2") - self.v_ma = ma.array([self.fillval, 5, 4, -9999], dtype = "i2", mask = [True, False, False, True]) + self.v_ma = ma.MaskedArray([self.fillval, 5, 4, -9999], dtype = "i2", mask = [True, False, False, True]) self.scale_factor = 10. self.add_offset = 5. diff --git a/test/test_masked4.py b/test/test_masked4.py index 61d9a1690..791b8cdda 100755 --- a/test/test_masked4.py +++ b/test/test_masked4.py @@ -20,7 +20,7 @@ def setUp(self): self.valid_max = 32765 self.valid_range = [self.valid_min,self.valid_max] self.v = np.array([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2") - self.v_ma = ma.array([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2", mask = [True, False, False, True]) + self.v_ma = ma.MaskedArray([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2", mask = [True, False, False, True]) self.scale_factor = 10. self.add_offset = 5. diff --git a/test/test_masked5.py b/test/test_masked5.py index 87734024a..22a25c6d4 100755 --- a/test/test_masked5.py +++ b/test/test_masked5.py @@ -17,7 +17,7 @@ def setUp(self): self.missing_values = [-999,999,0] self.v = np.array([-999,0,1,2,3,999], dtype = "i2") - self.v_ma = ma.array([-1,0,1,2,3,4], dtype = "i2", \ + self.v_ma = ma.MaskedArray([-1,0,1,2,3,4], dtype = "i2", \ mask = [True, True, False, False, False, True]) f = Dataset(self.testfile, 'w') diff --git a/test/test_masked6.py b/test/test_masked6.py index dc77da99e..0f19d6f14 100644 --- a/test/test_masked6.py +++ b/test/test_masked6.py @@ -18,7 +18,7 @@ def setUp(self): self.testfile = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name self.v = np.array([4, 3, 2, 1], dtype="i2") - self.w = np.ma.array([-1, -2, -3, -4], mask=[False, True, False, False], dtype="i2") + self.w = np.ma.MaskedArray([-1, -2, -3, -4], mask=[False, True, False, False], dtype="i2") f = Dataset(self.testfile, 'w') _ = f.createDimension('x', None) diff --git a/test/test_scaled.py b/test/test_scaled.py index 5c1ce9542..63f037558 100755 --- a/test/test_scaled.py +++ b/test/test_scaled.py @@ -22,7 +22,7 @@ def setUp(self): self.missing_value = -9999 self.v = np.array([0, 5, 4, self.missing_value], dtype = "i2") - self.v_ma = ma.array([0, 5, 4, self.missing_value], dtype = "i2", + self.v_ma = ma.MaskedArray([0, 5, 4, self.missing_value], dtype = "i2", mask = [True, False, False, True], fill_value = self.fillval) self.scale_factor = 10. diff --git a/test/test_types.py b/test/test_types.py index 3c5054bbd..b0a02fe51 100644 --- a/test/test_types.py +++ b/test/test_types.py @@ -22,7 +22,7 @@ zlib=False; complevel=0; shuffle=False; least_significant_digit=None datatypes = ['f8','f4','i1','i2','i4','i8','u1','u2','u4','u8','S1'] FillValue = 1.0 -issue273_data = np.ma.array(['z']*10,dtype='S1',\ +issue273_data = np.ma.MaskedArray(['z']*10,dtype='S1',\ mask=[False,False,False,False,False,True,False,False,False,False]) class PrimitiveTypesTestCase(unittest.TestCase): From 263d10c3f103d9f292c49579528bd00848fd3a09 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:23:59 -0700 Subject: [PATCH 03/11] temporarily enable cibuildwheel test for all pushes, fix stubtest error in test --- .github/workflows/cibuildwheel.yml | 10 +++++----- test/test_masked2.py | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 886f03b65..f34ac32bb 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -3,11 +3,11 @@ name: Wheels on: pull_request: push: - tags: - - "v*" - release: - types: - - published +# tags: +# - "v*" +# release: +# types: +# - published permissions: contents: read diff --git a/test/test_masked2.py b/test/test_masked2.py index 71bab907a..17fe06236 100755 --- a/test/test_masked2.py +++ b/test/test_masked2.py @@ -65,7 +65,6 @@ def setUp(self): # assign masked array to that variable with one missing value. data =\ ma.MaskedArray([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_)) - data.mask[1]=True v[:] = data f.close() From 6d17ee84a30b90c51c485def135f8b55c9fb721c Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:28:55 -0700 Subject: [PATCH 04/11] fix typo --- .github/workflows/cibuildwheel.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index f34ac32bb..ff1f925ee 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -3,11 +3,11 @@ name: Wheels on: pull_request: push: -# tags: -# - "v*" -# release: -# types: -# - published + tags: + - "v*" + release: + types: + - published permissions: contents: read @@ -170,7 +170,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ARM64 - CIBW_SKIP: "cp310-* + CIBW_SKIP: "cp310-*" - uses: actions/upload-artifact@v6 with: From 6960fa5b24a2f62d3de0f069993c3c8f8f8db1bc Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:42:57 -0700 Subject: [PATCH 05/11] don't skip 314t --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b0f4f7d3f..c7c98475a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,7 +110,6 @@ build-verbosity = 1 build-frontend = "build" skip = [ "*-musllinux*", - "cp314t-*", ] test-extras = "tests" test-sources = [ From e83c443a60fd3fcf4ad1663dcd4054bcd61d1463 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 19:17:18 -0700 Subject: [PATCH 06/11] disable GIL for running tests --- .github/workflows/cibuildwheel.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index ff1f925ee..cf99484eb 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -88,6 +88,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} + PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -131,6 +132,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} + PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -171,6 +173,7 @@ jobs: env: CIBW_ARCHS: ARM64 CIBW_SKIP: "cp310-*" + PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: From 92bcf3ebf1c703732a64061d5d9d59e622cf03f6 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 20:34:36 -0700 Subject: [PATCH 07/11] another attempt to disable GIL for running tests --- .github/workflows/cibuildwheel.yml | 3 --- pyproject.toml | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index cf99484eb..ff1f925ee 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -88,7 +88,6 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} - PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -132,7 +131,6 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} - PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -173,7 +171,6 @@ jobs: env: CIBW_ARCHS: ARM64 CIBW_SKIP: "cp310-*" - PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: diff --git a/pyproject.toml b/pyproject.toml index c7c98475a..c8499712a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,8 +117,8 @@ test-sources = [ "pyproject.toml" ] test-command = [ - '''python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', - "pytest -s -rxs -v test", + '''PYTHON_GIL=0 python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', + "pytest -Xgil=0 -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" manylinux-aarch64-image = "ghcr.io/ocefpaf/manylinux_2_28_aarch64-netcdf" From 442260f0bbc934061d2ff6479051884f2486e4c8 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 20:46:11 -0700 Subject: [PATCH 08/11] turn off GIL for pytest --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c8499712a..7878bdadc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,7 +118,7 @@ test-sources = [ ] test-command = [ '''PYTHON_GIL=0 python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', - "pytest -Xgil=0 -s -rxs -v test", + "python -X gil=0 -m pytest -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" manylinux-aarch64-image = "ghcr.io/ocefpaf/manylinux_2_28_aarch64-netcdf" From 4eec50ac8f748877664b7131e9e2bbbf15d970df Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 20:51:05 -0700 Subject: [PATCH 09/11] update --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7878bdadc..06f07aab8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,7 +117,7 @@ test-sources = [ "pyproject.toml" ] test-command = [ - '''PYTHON_GIL=0 python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', + '''python -X gil=0 -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', "python -X gil=0 -m pytest -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" From 666399441582a9af02f2050ab2f1e11683b8c76c Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 21:14:50 -0700 Subject: [PATCH 10/11] revert --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 06f07aab8..c7c98475a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,8 +117,8 @@ test-sources = [ "pyproject.toml" ] test-command = [ - '''python -X gil=0 -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', - "python -X gil=0 -m pytest -s -rxs -v test", + '''python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', + "pytest -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" manylinux-aarch64-image = "ghcr.io/ocefpaf/manylinux_2_28_aarch64-netcdf" From 316bcb853be476a893f0a37410fc1806d8769788 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 21:20:46 -0700 Subject: [PATCH 11/11] ignore RuntimeWarnings for pytest --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c7c98475a..965044732 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,6 +85,7 @@ pythonpath = ["test"] filterwarnings = [ "error", "ignore::UserWarning", + "ignore::RuntimeWarning", ] [tool.mypy]