File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ dependencies = [
3636 " awkward>=2.4.6" ,
3737 " importlib-metadata;python_version<\" 3.8\" " ,
3838 " numpy" ,
39+ " fsspec" ,
3940 " packaging" ,
4041 " typing_extensions>=4.1.0; python_version < \" 3.11\" "
4142]
Original file line number Diff line number Diff line change 2020from typing import IO
2121from urllib .parse import unquote , urlparse
2222
23+ import fsspec
2324import numpy
2425import packaging .version
2526
@@ -295,15 +296,7 @@ def regularize_path(path):
295296_windows_absolute_path_pattern_slash = re .compile (r"^[\\/][A-Za-z]:[\\/]" )
296297
297298_remote_schemes = ["root" , "s3" , "http" , "https" ]
298- _schemes = ["file" , * _remote_schemes ]
299-
300- try :
301- # TODO: remove this try/except when fsspec becomes a required dependency
302- import fsspec
303-
304- _schemes = list ({* _schemes , * fsspec .available_protocols ()})
305- except ImportError :
306- pass
299+ _schemes = list ({* _remote_schemes , * fsspec .available_protocols ()})
307300
308301_uri_scheme = re .compile ("^(" + "|" .join ([re .escape (x ) for x in _schemes ]) + ")://" )
309302
Original file line number Diff line number Diff line change 66import concurrent .futures
77import queue
88
9+ import fsspec
10+ import fsspec .asyn
11+
912import uproot
1013import uproot .source .chunk
1114import uproot .source .futures
@@ -24,8 +27,6 @@ class FSSpecSource(uproot.source.chunk.Source):
2427 """
2528
2629 def __init__ (self , file_path : str , ** options ):
27- import fsspec .core
28-
2930 default_options = uproot .reading .open .defaults
3031
3132 exclude_keys = set (default_options .keys ())
@@ -191,8 +192,6 @@ def closed(self) -> bool:
191192class FSSpecLoopExecutor (uproot .source .futures .Executor ):
192193 @property
193194 def loop (self ) -> asyncio .AbstractEventLoop :
194- import fsspec .asyn
195-
196195 return fsspec .asyn .get_loop ()
197196
198197 def submit (self , coroutine ) -> concurrent .futures .Future :
You can’t perform that action at this time.
0 commit comments