Skip to content

Commit 57e91ab

Browse files
committed
Remove redundant Conditional imports.
Zarr is only Python 3.5+ so this check is not necessary anymore.
1 parent dc5e9fa commit 57e91ab

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

zarr/storage.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import zipfile
3030
from collections import OrderedDict
3131
from collections.abc import MutableMapping
32-
from os import scandir
32+
from os import scandir, replace
3333
from pickle import PicklingError
3434
from threading import Lock, RLock
3535
import uuid
@@ -65,15 +65,6 @@
6565
from zarr.codecs import Zlib
6666
default_compressor = Zlib()
6767

68-
# Find which function to use for atomic replace
69-
if sys.version_info >= (3, 3):
70-
from os import replace
71-
elif sys.platform == "win32": # pragma: no cover
72-
from osreplace import replace
73-
else: # pragma: no cover
74-
# POSIX rename() is always atomic
75-
from os import rename as replace
76-
7768

7869
def _path_to_prefix(path):
7970
# assume path already normalized

0 commit comments

Comments
 (0)