@@ -40,8 +40,6 @@ def __init__(
4040 # What should we do when there is a chain of filesystems?
4141 self ._async_impl = self ._fs .async_impl
4242
43- self ._file = None
44-
4543 self ._open ()
4644
4745 self .__enter__ ()
@@ -56,7 +54,6 @@ def extract_fsspec_options(cls, options: dict) -> dict:
5654
5755 def _open (self ):
5856 self ._executor = FSSpecLoopExecutor ()
59- self ._file = self ._fs .open (self ._file_path )
6057
6158 def __repr__ (self ):
6259 path = repr (self ._file_path )
@@ -67,19 +64,16 @@ def __repr__(self):
6764 def __getstate__ (self ):
6865 state = dict (self .__dict__ )
6966 state .pop ("_executor" )
70- state .pop ("_file" )
7167 return state
7268
7369 def __setstate__ (self , state ):
7470 self .__dict__ = state
75- self ._file = None
7671 self ._open ()
7772
7873 def __enter__ (self ):
7974 return self
8075
8176 def __exit__ (self , exception_type , exception_value , traceback ):
82- self ._file .__exit__ (exception_type , exception_value , traceback )
8377 self ._executor .shutdown ()
8478
8579 def chunk (self , start : int , stop : int ) -> uproot .source .chunk .Chunk :
@@ -190,7 +184,8 @@ def closed(self) -> bool:
190184 True if the associated file/connection/thread pool is closed; False
191185 otherwise.
192186 """
193- return self ._file .closed
187+ # FSSpecSource uses entirely stateless interfaces
188+ return False
194189
195190
196191class FSSpecLoopExecutor (uproot .source .futures .Executor ):
0 commit comments