Skip to content

Commit 6cb9f37

Browse files
committed
more trim
1 parent 4b974c9 commit 6cb9f37

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+27
-15573
lines changed

fsspec/__init__.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from ._version import __version__ # noqa: F401
33
from .core import get_fs_token_paths, open, open_files, open_local, url_to_fs
44
from .exceptions import FSTimeoutError
5-
from .mapping import FSMap, get_mapper
65
from .registry import (
76
available_protocols,
87
filesystem,
@@ -15,12 +14,10 @@
1514
__all__ = [
1615
"AbstractFileSystem",
1716
"FSTimeoutError",
18-
"FSMap",
1917
"filesystem",
2018
"register_implementation",
2119
"get_filesystem_class",
2220
"get_fs_token_paths",
23-
"get_mapper",
2421
"open",
2522
"open_files",
2623
"open_local",
@@ -29,39 +26,3 @@
2926
"available_protocols",
3027
"url_to_fs",
3128
]
32-
33-
34-
def process_entries():
35-
try:
36-
from importlib.metadata import entry_points
37-
except ImportError:
38-
return
39-
if entry_points is not None:
40-
try:
41-
eps = entry_points()
42-
except TypeError:
43-
pass # importlib-metadata < 0.8
44-
else:
45-
if hasattr(eps, "select"): # Python 3.10+ / importlib_metadata >= 3.9.0
46-
specs = eps.select(group="fsspec.specs")
47-
else:
48-
specs = eps.get("fsspec.specs", [])
49-
registered_names = {}
50-
for spec in specs:
51-
err_msg = f"Unable to load filesystem from {spec}"
52-
name = spec.name
53-
if name in registered_names:
54-
continue
55-
registered_names[name] = True
56-
register_implementation(
57-
name,
58-
spec.value.replace(":", "."),
59-
errtxt=err_msg,
60-
# We take our implementations as the ones to overload with if
61-
# for some reason we encounter some, may be the same, already
62-
# registered
63-
clobber=True,
64-
)
65-
66-
67-
process_entries()

fsspec/config.py

Lines changed: 0 additions & 108 deletions
This file was deleted.

fsspec/core.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
ReadAheadCache,
1010
caches,
1111
)
12-
from fsspec.config import conf
1312
from fsspec.registry import filesystem, get_filesystem_class
1413
from fsspec.utils import (
1514
_unstrip_protocol,
@@ -310,8 +309,6 @@ def open_files(
310309

311310
def _un_chain(path, kwargs):
312311
# Avoid a circular import
313-
from fsspec.implementations.cached import CachingFileSystem
314-
315312
if "::" in path:
316313
x = re.compile(".*[^a-z]+.*") # test for non protocol-like single word
317314
bits = []
@@ -324,7 +321,6 @@ def _un_chain(path, kwargs):
324321
bits = [path]
325322
# [[url, protocol, kwargs], ...]
326323
out = []
327-
previous_bit = None
328324
kwargs = kwargs.copy()
329325
for bit in reversed(bits):
330326
protocol = kwargs.pop("protocol", None) or split_protocol(bit)[0] or "file"
@@ -338,10 +334,7 @@ def _un_chain(path, kwargs):
338334
**kws,
339335
)
340336
bit = cls._strip_protocol(bit)
341-
if "target_protocol" not in kw and issubclass(cls, CachingFileSystem):
342-
bit = previous_bit
343337
out.append((bit, protocol, kw))
344-
previous_bit = bit
345338
out.reverse()
346339
return out
347340

@@ -396,7 +389,7 @@ def url_to_fs(url, **kwargs):
396389
return fs, urlpath
397390

398391

399-
DEFAULT_EXPAND = conf.get("open_expand", False)
392+
DEFAULT_EXPAND = False
400393

401394

402395
def open(

fsspec/dircache.py

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)