fsspec 2025.2.0__py3-none-any.whl → 2025.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fsspec/_version.py +9 -4
- fsspec/asyn.py +12 -0
- fsspec/caching.py +40 -1
- fsspec/core.py +1 -1
- fsspec/implementations/asyn_wrapper.py +9 -5
- fsspec/implementations/cached.py +13 -1
- fsspec/implementations/dirfs.py +8 -4
- fsspec/implementations/github.py +46 -18
- fsspec/implementations/http.py +24 -0
- fsspec/implementations/http_sync.py +931 -0
- fsspec/implementations/local.py +8 -7
- fsspec/implementations/reference.py +2 -3
- fsspec/registry.py +4 -1
- {fsspec-2025.2.0.dist-info → fsspec-2025.3.1.dist-info}/METADATA +1 -1
- {fsspec-2025.2.0.dist-info → fsspec-2025.3.1.dist-info}/RECORD +17 -16
- {fsspec-2025.2.0.dist-info → fsspec-2025.3.1.dist-info}/WHEEL +0 -0
- {fsspec-2025.2.0.dist-info → fsspec-2025.3.1.dist-info}/licenses/LICENSE +0 -0
fsspec/implementations/local.py
CHANGED
|
@@ -57,20 +57,21 @@ class LocalFileSystem(AbstractFileSystem):
|
|
|
57
57
|
|
|
58
58
|
def ls(self, path, detail=False, **kwargs):
|
|
59
59
|
path = self._strip_protocol(path)
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
path_info = self.info(path)
|
|
61
|
+
infos = []
|
|
62
|
+
if path_info["type"] == "directory":
|
|
62
63
|
with os.scandir(path) as it:
|
|
63
|
-
infos = []
|
|
64
64
|
for f in it:
|
|
65
65
|
try:
|
|
66
|
-
|
|
66
|
+
# Only get the info if requested since it is a bit expensive (the stat call inside)
|
|
67
|
+
# The strip_protocol is also used in info() and calls make_path_posix to always return posix paths
|
|
68
|
+
info = self.info(f) if detail else self._strip_protocol(f.path)
|
|
69
|
+
infos.append(info)
|
|
67
70
|
except FileNotFoundError:
|
|
68
71
|
pass
|
|
69
72
|
else:
|
|
70
|
-
infos = [
|
|
73
|
+
infos = [path_info] if detail else [path_info["name"]]
|
|
71
74
|
|
|
72
|
-
if not detail:
|
|
73
|
-
return [i["name"] for i in infos]
|
|
74
75
|
return infos
|
|
75
76
|
|
|
76
77
|
def info(self, path, **kwargs):
|
|
@@ -140,13 +140,13 @@ class LazyReferenceMapper(collections.abc.MutableMapping):
|
|
|
140
140
|
|
|
141
141
|
self.root = root
|
|
142
142
|
self.chunk_sizes = {}
|
|
143
|
-
self.out_root = out_root or self.root
|
|
144
143
|
self.cat_thresh = categorical_threshold
|
|
145
144
|
self.engine = engine
|
|
146
145
|
self.cache_size = cache_size
|
|
147
146
|
self.url = self.root + "/{field}/refs.{record}.parq"
|
|
148
147
|
# TODO: derive fs from `root`
|
|
149
148
|
self.fs = fsspec.filesystem("file") if fs is None else fs
|
|
149
|
+
self.out_root = self.fs.unstrip_protocol(out_root or self.root)
|
|
150
150
|
|
|
151
151
|
from importlib.util import find_spec
|
|
152
152
|
|
|
@@ -498,7 +498,6 @@ class LazyReferenceMapper(collections.abc.MutableMapping):
|
|
|
498
498
|
}
|
|
499
499
|
else:
|
|
500
500
|
raise NotImplementedError(f"{self.engine} not supported")
|
|
501
|
-
|
|
502
501
|
df.to_parquet(
|
|
503
502
|
fn,
|
|
504
503
|
engine=self.engine,
|
|
@@ -766,7 +765,7 @@ class ReferenceFileSystem(AsyncFileSystem):
|
|
|
766
765
|
# Wrap any non-async filesystems to ensure async methods are available below
|
|
767
766
|
for k, f in self.fss.items():
|
|
768
767
|
if not f.async_impl:
|
|
769
|
-
self.fss[k] = AsyncFileSystemWrapper(f)
|
|
768
|
+
self.fss[k] = AsyncFileSystemWrapper(f, asynchronous=self.asynchronous)
|
|
770
769
|
elif self.asynchronous ^ f.asynchronous:
|
|
771
770
|
raise ValueError(
|
|
772
771
|
"Reference-FS's target filesystem must have same value"
|
fsspec/registry.py
CHANGED
|
@@ -72,6 +72,9 @@ known_implementations = {
|
|
|
72
72
|
"class": "fsspec.implementations.arrow.HadoopFileSystem",
|
|
73
73
|
"err": "pyarrow and local java libraries required for HDFS",
|
|
74
74
|
},
|
|
75
|
+
"async_wrapper": {
|
|
76
|
+
"class": "fsspec.asyn_wrapper.AsyncWrapperFileSystem",
|
|
77
|
+
},
|
|
75
78
|
"asynclocal": {
|
|
76
79
|
"class": "morefs.asyn_local.AsyncLocalFileSystem",
|
|
77
80
|
"err": "Install 'morefs[asynclocalfs]' to use AsyncLocalFileSystem",
|
|
@@ -245,7 +248,7 @@ def get_filesystem_class(protocol):
|
|
|
245
248
|
try:
|
|
246
249
|
register_implementation(protocol, _import_class(bit["class"]))
|
|
247
250
|
except ImportError as e:
|
|
248
|
-
raise ImportError(bit
|
|
251
|
+
raise ImportError(bit.get("err")) from e
|
|
249
252
|
cls = registry[protocol]
|
|
250
253
|
if getattr(cls, "protocol", None) in ("abstract", None):
|
|
251
254
|
cls.protocol = protocol
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fsspec
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.3.1
|
|
4
4
|
Summary: File-system specification
|
|
5
5
|
Project-URL: Changelog, https://filesystem-spec.readthedocs.io/en/latest/changelog.html
|
|
6
6
|
Project-URL: Documentation, https://filesystem-spec.readthedocs.io/en/latest/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
fsspec/__init__.py,sha256=l9MJaNNV2d4wKpCtMvXDr55n92DkdrAayGy3F9ICjzk,1998
|
|
2
|
-
fsspec/_version.py,sha256=
|
|
2
|
+
fsspec/_version.py,sha256=UTo0k75fb91X4ciJgm5Nvk4otinCDkfq8764_G1IYzQ,517
|
|
3
3
|
fsspec/archive.py,sha256=vM6t_lgV6lBWbBYwpm3S4ofBQFQxUPr5KkDQrrQcQro,2411
|
|
4
|
-
fsspec/asyn.py,sha256=
|
|
5
|
-
fsspec/caching.py,sha256=
|
|
4
|
+
fsspec/asyn.py,sha256=VJ2jBdYgUjV4_dETpKeCp2wF1XHAdeUET95d2HqNZck,36776
|
|
5
|
+
fsspec/caching.py,sha256=pGEBXy2hUh7YBZdZAcCT-38LFmJFDWU9gbmQi05AvFY,34292
|
|
6
6
|
fsspec/callbacks.py,sha256=BDIwLzK6rr_0V5ch557fSzsivCElpdqhXr5dZ9Te-EE,9210
|
|
7
7
|
fsspec/compression.py,sha256=jCSUMJu-zSNyrusnHT0wKXgOd1tTJR6vM126i5SR5Zc,4865
|
|
8
8
|
fsspec/config.py,sha256=LF4Zmu1vhJW7Je9Q-cwkRc3xP7Rhyy7Xnwj26Z6sv2g,4279
|
|
9
9
|
fsspec/conftest.py,sha256=fVfx-NLrH_OZS1TIpYNoPzM7efEcMoL62reHOdYeFCA,1245
|
|
10
|
-
fsspec/core.py,sha256=
|
|
10
|
+
fsspec/core.py,sha256=1tLctwr7sF1VO3djc_UkjhJ8IAEy0TUMH_bb07Sw17E,23828
|
|
11
11
|
fsspec/dircache.py,sha256=YzogWJrhEastHU7vWz-cJiJ7sdtLXFXhEpInGKd4EcM,2717
|
|
12
12
|
fsspec/exceptions.py,sha256=pauSLDMxzTJMOjvX1WEUK0cMyFkrFxpWJsyFywav7A8,331
|
|
13
13
|
fsspec/fuse.py,sha256=Q-3NOOyLqBfYa4Db5E19z_ZY36zzYHtIs1mOUasItBQ,10177
|
|
@@ -16,29 +16,30 @@ fsspec/gui.py,sha256=xBnHL2-r0LVwhDAtnHoPpXts7jd4Z32peawCJiI-7lI,13975
|
|
|
16
16
|
fsspec/json.py,sha256=65sQ0Y7mTj33u_Y4IId5up4abQ3bAel4E4QzbKMiQSg,3826
|
|
17
17
|
fsspec/mapping.py,sha256=m2ndB_gtRBXYmNJg0Ie1-BVR75TFleHmIQBzC-yWhjU,8343
|
|
18
18
|
fsspec/parquet.py,sha256=6ibAmG527L5JNFS0VO8BDNlxHdA3bVYqdByeiFgpUVM,19448
|
|
19
|
-
fsspec/registry.py,sha256=
|
|
19
|
+
fsspec/registry.py,sha256=5kz-61fkb29lgSLzXWvk67ft6ooeYJR24Hs1583rD8w,11570
|
|
20
20
|
fsspec/spec.py,sha256=l7ZEbgLsnrFuS-yrGl9re6ia1Yts1_10RqGV_mT-5P8,76032
|
|
21
21
|
fsspec/transaction.py,sha256=xliRG6U2Zf3khG4xcw9WiB-yAoqJSHEGK_VjHOdtgo0,2398
|
|
22
22
|
fsspec/utils.py,sha256=A11t25RnpiQ30RO6xeR0Qqlu3fGj8bnc40jg08tlYSI,22980
|
|
23
23
|
fsspec/implementations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
fsspec/implementations/arrow.py,sha256=721Dikne_lV_0tlgk9jyKmHL6W-5MT0h2LKGvOYQTPI,8623
|
|
25
|
-
fsspec/implementations/asyn_wrapper.py,sha256=
|
|
25
|
+
fsspec/implementations/asyn_wrapper.py,sha256=PNkYdHiLVWwk-GJok5O6dTnhPwDaSU9QTtBTE9CIRec,3082
|
|
26
26
|
fsspec/implementations/cache_mapper.py,sha256=W4wlxyPxZbSp9ItJ0pYRVBMh6bw9eFypgP6kUYuuiI4,2421
|
|
27
27
|
fsspec/implementations/cache_metadata.py,sha256=pcOJYcBQY5OaC7Yhw0F3wjg08QLYApGmoISCrbs59ks,8511
|
|
28
|
-
fsspec/implementations/cached.py,sha256=
|
|
28
|
+
fsspec/implementations/cached.py,sha256=2EqeHZi6TKZzr222ZyXHjuYBnx_1g_HWXj1CJBFsXbc,33173
|
|
29
29
|
fsspec/implementations/dask.py,sha256=CXZbJzIVOhKV8ILcxuy3bTvcacCueAbyQxmvAkbPkrk,4466
|
|
30
30
|
fsspec/implementations/data.py,sha256=LDLczxRh8h7x39Zjrd-GgzdQHr78yYxDlrv2C9Uxb5E,1658
|
|
31
31
|
fsspec/implementations/dbfs.py,sha256=XwpotuS_ncz3XK1dkUteww9GnTja7HoY91c0m4GUfwI,15092
|
|
32
|
-
fsspec/implementations/dirfs.py,sha256=
|
|
32
|
+
fsspec/implementations/dirfs.py,sha256=f1sGnQ9Vf0xTxrXo4jDeBy4Qfq3RTqAEemqBSeb0hwY,12108
|
|
33
33
|
fsspec/implementations/ftp.py,sha256=sorsczLp_2J3ukONsbZY-11sRZP6H5a3V7XXf6o6ip0,11936
|
|
34
34
|
fsspec/implementations/git.py,sha256=4SElW9U5d3k3_ITlvUAx59Yk7XLNRTqkGa2C3hCUkWM,3754
|
|
35
|
-
fsspec/implementations/github.py,sha256=
|
|
36
|
-
fsspec/implementations/http.py,sha256=
|
|
35
|
+
fsspec/implementations/github.py,sha256=tvLepeDtBsFHYocsD7XS1W6r8wxaoK57Us3kHGisnjU,9146
|
|
36
|
+
fsspec/implementations/http.py,sha256=_gLt0yGbVOYWvE9pK81WCC-3TgbOMOKJYllBU72ALo8,30138
|
|
37
|
+
fsspec/implementations/http_sync.py,sha256=UydDqSdUBdhiJ1KufzV8rKGrTftFR4QmNV0safILb8g,30133
|
|
37
38
|
fsspec/implementations/jupyter.py,sha256=B2uj7OEm7yIk-vRSsO37_ND0t0EBvn4B-Su43ibN4Pg,3811
|
|
38
39
|
fsspec/implementations/libarchive.py,sha256=5_I2DiLXwQ1JC8x-K7jXu-tBwhO9dj7tFLnb0bTnVMQ,7102
|
|
39
|
-
fsspec/implementations/local.py,sha256=
|
|
40
|
+
fsspec/implementations/local.py,sha256=g2iK8uWPGkSiI6bwmnIRXhJMQvTegCmXZ8Kb8ojhvAo,15543
|
|
40
41
|
fsspec/implementations/memory.py,sha256=cLNrK9wk97sl4Tre9uVDXWj6mEHvvVVIgaVgNA5KVIg,10527
|
|
41
|
-
fsspec/implementations/reference.py,sha256=
|
|
42
|
+
fsspec/implementations/reference.py,sha256=t23prs_5ugXJnYhLxLlPLPyagrx4_ofZWR_oyX9wd3Q,48703
|
|
42
43
|
fsspec/implementations/sftp.py,sha256=fMY9XZcmpjszQ2tCqO_TPaJesaeD_Dv7ptYzgUPGoO0,5631
|
|
43
44
|
fsspec/implementations/smb.py,sha256=5fhu8h06nOLBPh2c48aT7WBRqh9cEcbIwtyu06wTjec,15236
|
|
44
45
|
fsspec/implementations/tar.py,sha256=dam78Tp_CozybNqCY2JYgGBS3Uc9FuJUAT9oB0lolOs,4111
|
|
@@ -52,7 +53,7 @@ fsspec/tests/abstract/mv.py,sha256=k8eUEBIrRrGMsBY5OOaDXdGnQUKGwDIfQyduB6YD3Ns,1
|
|
|
52
53
|
fsspec/tests/abstract/open.py,sha256=Fi2PBPYLbRqysF8cFm0rwnB41kMdQVYjq8cGyDXp3BU,329
|
|
53
54
|
fsspec/tests/abstract/pipe.py,sha256=LFzIrLCB5GLXf9rzFKJmE8AdG7LQ_h4bJo70r8FLPqM,402
|
|
54
55
|
fsspec/tests/abstract/put.py,sha256=7aih17OKB_IZZh1Mkq1eBDIjobhtMQmI8x-Pw-S_aZk,21201
|
|
55
|
-
fsspec-2025.
|
|
56
|
-
fsspec-2025.
|
|
57
|
-
fsspec-2025.
|
|
58
|
-
fsspec-2025.
|
|
56
|
+
fsspec-2025.3.1.dist-info/METADATA,sha256=CJaBlMGwxuW44faR38hNdBi2I1sydTS-KgC_hp6HzWc,11747
|
|
57
|
+
fsspec-2025.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
58
|
+
fsspec-2025.3.1.dist-info/licenses/LICENSE,sha256=LcNUls5TpzB5FcAIqESq1T53K0mzTN0ARFBnaRQH7JQ,1513
|
|
59
|
+
fsspec-2025.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|