Skip to content

Commit 9084163

Browse files
authored
upath.registry: don't rely on fsspec.registry.available_protocols (#139)
1 parent 16bfd3a commit 9084163

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

upath/registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from typing import MutableMapping
4242

4343
from fsspec.core import get_filesystem_class
44-
from fsspec.registry import available_protocols
44+
from fsspec.registry import known_implementations as _fsspec_known_implementations
4545

4646
import upath.core
4747

@@ -138,7 +138,7 @@ def available_implementations(*, fallback: bool = False) -> list[str]:
138138
if not fallback:
139139
return impl
140140
else:
141-
return list({*impl, *available_protocols()})
141+
return list({*impl, *list(_fsspec_known_implementations)})
142142

143143

144144
def register_implementation(

upath/tests/test_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
from fsspec.registry import available_protocols
2+
from fsspec.registry import known_implementations
33

44
from upath import UPath
55
from upath.registry import available_implementations
@@ -64,7 +64,7 @@ def test_available_implementations():
6464

6565
def test_available_implementations_with_fallback():
6666
impl = available_implementations(fallback=True)
67-
assert set(impl) == IMPLEMENTATIONS.union(available_protocols())
67+
assert set(impl) == IMPLEMENTATIONS.union(list(known_implementations))
6868

6969

7070
def test_available_implementations_with_entrypoint(fake_entrypoint):

0 commit comments

Comments
 (0)