Skip to content

Commit 1d9fe51

Browse files
committed
Move back NETCDF4_PYTHON_LOCK
1 parent e79781b commit 1d9fe51

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

xarray/backends/locks.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,3 @@ def ensure_lock(lock: Lock | None | Literal[False]) -> Lock:
281281
if lock is None or lock is False:
282282
return DummyLock()
283283
return lock
284-
285-
286-
NETCDF4_PYTHON_LOCK = combine_locks([NETCDFC_LOCK, HDF5_LOCK])

xarray/backends/netCDF4_.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
PickleableFileManager,
3131
)
3232
from xarray.backends.locks import (
33-
NETCDF4_PYTHON_LOCK,
33+
HDF5_LOCK,
3434
NETCDFC_LOCK,
3535
combine_locks,
3636
ensure_lock,
@@ -66,6 +66,7 @@
6666
# string used by netCDF4.
6767
_endian_lookup = {"=": "native", ">": "big", "<": "little", "|": "native"}
6868

69+
NETCDF4_PYTHON_LOCK = combine_locks([NETCDFC_LOCK, HDF5_LOCK])
6970

7071
class BaseNetCDF4Array(BackendArray):
7172
__slots__ = ("datastore", "dtype", "shape", "variable_name")

0 commit comments

Comments
 (0)