@@ -110,7 +110,12 @@ class TestFsspecStoreS3(StoreTests[FsspecStore, cpu.Buffer]):
110110
111111 @pytest .fixture
112112 def store_kwargs (self , request ) -> dict [str , str | bool ]:
113- fs , path = fsspec .url_to_fs (
113+ try :
114+ from fsspec import url_to_fs
115+ except ImportError :
116+ # before fsspec==2024.3.1
117+ from fsspec .core import url_to_fs
118+ fs , path = url_to_fs (
114119 f"s3://{ test_bucket_name } " , endpoint_url = endpoint_url , anon = False , asynchronous = True
115120 )
116121 return {"fs" : fs , "path" : path }
@@ -182,6 +187,10 @@ async def test_fsspec_store_from_uri(self, store: FsspecStore) -> None:
182187 )
183188 assert dict (group .attrs ) == {"key" : "value-3" }
184189
190+ @pytest .mark .skipif (
191+ parse_version (fsspec .__version__ ) < parse_version ("2024.03.01" ),
192+ reason = "Prior bug in from_upath" ,
193+ )
185194 def test_from_upath (self ) -> None :
186195 upath = pytest .importorskip ("upath" )
187196 path = upath .UPath (
@@ -204,7 +213,12 @@ def test_init_raises_if_path_has_scheme(self, store_kwargs) -> None:
204213 self .store_cls (** store_kwargs )
205214
206215 def test_init_warns_if_fs_asynchronous_is_false (self ) -> None :
207- fs , path = fsspec .url_to_fs (
216+ try :
217+ from fsspec import url_to_fs
218+ except ImportError :
219+ # before fsspec==2024.3.1
220+ from fsspec .core import url_to_fs
221+ fs , path = url_to_fs (
208222 f"s3://{ test_bucket_name } " , endpoint_url = endpoint_url , anon = False , asynchronous = False
209223 )
210224 store_kwargs = {"fs" : fs , "path" : path }
0 commit comments