Skip to content

Commit 437619e

Browse files
authored
Merge pull request #1459 from Unidata/ftwheels
include free-threaded 3.14 wheels
2 parents 532c285 + 2752937 commit 437619e

File tree

13 files changed

+59
-26
lines changed

13 files changed

+59
-26
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
# These needs to rotate every new Python release.
8080
run: |
8181
set -x
82-
echo "CIBW_BUILD=cp310-* cp311-* cp314-*" >> $GITHUB_ENV
82+
echo "CIBW_BUILD=cp310-* cp311-* cp314-* cp314t-*" >> $GITHUB_ENV
8383
set +x
8484
8585
if: ${{ github.event_name }} == "pull_request"
@@ -170,7 +170,7 @@ jobs:
170170
uses: pypa/[email protected]
171171
env:
172172
CIBW_ARCHS: ARM64
173-
CIBW_SKIP: "cp310-* cp314t-*"
173+
CIBW_SKIP: "cp310-*"
174174

175175
- uses: actions/upload-artifact@v6
176176
with:

Changelog

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
version 1.7.4 (not yet released)
1+
version 1.7.4 (tag v1.7.4rel)
22
================================
33
* Make sure automatic conversion of character arrays <--> string arrays works for Unicode strings (issue #1440).
44
(previously only worked correctly for encoding="ascii").
55
* Add netcdf plugins (blosc, zstd, bzip2) in wheels. Blosc plugin doesn't work in Windows wheels.
66
Macos wheels now use conda provided libs. (PR #1450)
7+
* Add windows/arm (PR #1453) and free-threaded python wheels (issue #1454). Windows wheels now use netcdf-c 4.9.3.
8+
WARNING: netcdf-c is not thread-safe and netcdf4-python does have internal locking so expect segfaults if you
9+
use netcdf4-python on multiple threads with free-threaded python. Users must exercise care to only call netcdf from
10+
a single thread.
711

812
version 1.7.3 (tag v1.7.3rel)
913
=============================

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
## News
1111
For details on the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog).
1212

13+
1/5/2026: Version [1.7.4](https://pypi.python.org/pypi/netCDF4/1.7.4) released. Compression plugins now included in wheels, windows/arm and
14+
free-threaded python wheels provided. Automatic conversion of character arrays <--> string arrays works for Unicode (not just ascii) strings.
15+
WARNING: netcdf-c is not thread-safe and netcdf4-python does have internal locking so expect segfaults if you
16+
use netcdf4-python on multiple threads with free-threaded python. Users must exercise care to only call netcdf from
17+
a single thread.
18+
1319
10/13/2025: Version [1.7.3](https://pypi.python.org/pypi/netCDF4/1.7.3) released. Minor updates/bugfixes and python 3.14 wheels, see Changelog for details.
1420

1521
10/22/2024: Version [1.7.2](https://pypi.python.org/pypi/netCDF4/1.7.2) released. Minor updates/bugfixes and python 3.13 wheels, see Changelog for details.

docs/index.html

Lines changed: 34 additions & 14 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ pythonpath = ["test"]
8585
filterwarnings = [
8686
"error",
8787
"ignore::UserWarning",
88+
"ignore::RuntimeWarning",
8889
]
8990

9091
[tool.mypy]
@@ -110,7 +111,6 @@ build-verbosity = 1
110111
build-frontend = "build"
111112
skip = [
112113
"*-musllinux*",
113-
"cp314t-*",
114114
]
115115
test-extras = "tests"
116116
test-sources = [

src/netCDF4/_netCDF4.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,10 @@ are collective. There are a couple of important limitations of parallel IO:
10501050
to write to it.
10511051
- You cannot use variable-length (VLEN) data types.
10521052
1053+
***Import warning regarding threads:*** The underlying netcdf-c library is not thread-safe, so netcdf4-python cannot perform parallel
1054+
IO in a multi-threaded environment. Users should expect segfaults if a netcdf file is opened on multiple threads - care should
1055+
be taken to restrict netcdf4-python usage to a single thread, even when using free-threaded python.
1056+
10531057
## Dealing with strings
10541058
10551059
The most flexible way to store arrays of strings is with the

test/test_masked2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ def setUp(self):
6464
v = f.createVariable('v',np.float32,'x',zlib=True,least_significant_digit=1)
6565
# assign masked array to that variable with one missing value.
6666
data =\
67-
ma.array([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_))
68-
data.mask[1]=True
67+
ma.MaskedArray([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_))
6968
v[:] = data
7069
f.close()
7170

test/test_masked3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def setUp(self):
1919

2020
self.fillval = default_fillvals["i2"]
2121
self.v = np.array([self.fillval, 5, 4, -9999], dtype = "i2")
22-
self.v_ma = ma.array([self.fillval, 5, 4, -9999], dtype = "i2", mask = [True, False, False, True])
22+
self.v_ma = ma.MaskedArray([self.fillval, 5, 4, -9999], dtype = "i2", mask = [True, False, False, True])
2323

2424
self.scale_factor = 10.
2525
self.add_offset = 5.

test/test_masked4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def setUp(self):
2020
self.valid_max = 32765
2121
self.valid_range = [self.valid_min,self.valid_max]
2222
self.v = np.array([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2")
23-
self.v_ma = ma.array([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2", mask = [True, False, False, True])
23+
self.v_ma = ma.MaskedArray([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2", mask = [True, False, False, True])
2424

2525
self.scale_factor = 10.
2626
self.add_offset = 5.

test/test_masked5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def setUp(self):
1717

1818
self.missing_values = [-999,999,0]
1919
self.v = np.array([-999,0,1,2,3,999], dtype = "i2")
20-
self.v_ma = ma.array([-1,0,1,2,3,4], dtype = "i2", \
20+
self.v_ma = ma.MaskedArray([-1,0,1,2,3,4], dtype = "i2", \
2121
mask = [True, True, False, False, False, True])
2222

2323
f = Dataset(self.testfile, 'w')

0 commit comments

Comments
 (0)