fsspec 2024.12.0__tar.gz → 2025.3.0__tar.gz
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-2024.12.0 → fsspec-2025.3.0}/.pre-commit-config.yaml +5 -1
- {fsspec-2024.12.0 → fsspec-2025.3.0}/PKG-INFO +1 -2
- {fsspec-2024.12.0 → fsspec-2025.3.0}/ci/environment-downstream.yml +0 -1
- fsspec-2025.3.0/correct_permissions.bin +1 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/changelog.rst +35 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/_version.py +9 -4
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/archive.py +3 -1
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/core.py +1 -1
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/asyn_wrapper.py +11 -6
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/dbfs.py +3 -3
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/dirfs.py +8 -4
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/http.py +24 -0
- fsspec-2025.3.0/fsspec/implementations/http_sync.py +932 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/local.py +8 -7
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/reference.py +101 -12
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/registry.py +6 -3
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/spec.py +3 -3
- {fsspec-2024.12.0 → fsspec-2025.3.0}/pyproject.toml +0 -5
- fsspec-2024.12.0/.github/workflows/codespell.yml +0 -19
- {fsspec-2024.12.0 → fsspec-2025.3.0}/.codespellrc +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/.coveragerc +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/.gitattributes +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/.github/workflows/main.yaml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/.github/workflows/pypipublish.yaml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/.gitignore +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/LICENSE +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/README.md +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/ci/environment-friends.yml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/ci/environment-py38.yml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/ci/environment-typecheck.yml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/ci/environment-win.yml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/Makefile +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/README.md +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/environment.yml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/make.bat +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/_static/custom.css +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/api.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/async.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/conf.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/copying.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/developer.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/features.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/img/gui.png +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/index.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/intro.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/docs/source/usage.rst +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/__init__.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/asyn.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/caching.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/callbacks.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/compression.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/config.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/conftest.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/dircache.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/exceptions.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/fuse.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/generic.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/gui.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/__init__.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/arrow.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/cache_mapper.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/cache_metadata.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/cached.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/dask.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/data.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/ftp.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/git.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/github.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/jupyter.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/libarchive.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/memory.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/sftp.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/smb.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/tar.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/webhdfs.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/implementations/zip.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/json.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/mapping.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/parquet.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/__init__.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/common.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/copy.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/get.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/mv.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/open.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/pipe.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/tests/abstract/put.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/transaction.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/fsspec/utils.py +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/install_s3fs.sh +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/readthedocs.yml +0 -0
- {fsspec-2024.12.0 → fsspec-2025.3.0}/setup.cfg +0 -0
|
@@ -14,10 +14,14 @@ repos:
|
|
|
14
14
|
- id: check-yaml
|
|
15
15
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
16
16
|
# Ruff version.
|
|
17
|
-
rev: v0.
|
|
17
|
+
rev: v0.9.2
|
|
18
18
|
hooks:
|
|
19
19
|
# Run the linter.
|
|
20
20
|
- id: ruff
|
|
21
21
|
args: [ --fix, "--show-fixes"]
|
|
22
22
|
- id: ruff-format
|
|
23
23
|
types_or: [python]
|
|
24
|
+
- repo: https://github.com/codespell-project/codespell
|
|
25
|
+
rev: v2.4.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: codespell
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fsspec
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2025.3.0
|
|
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/
|
|
@@ -131,7 +131,6 @@ Requires-Dist: pytest-rerunfailures; extra == 'test'
|
|
|
131
131
|
Requires-Dist: requests; extra == 'test'
|
|
132
132
|
Provides-Extra: test-downstream
|
|
133
133
|
Requires-Dist: aiobotocore<3.0.0,>=2.5.4; extra == 'test-downstream'
|
|
134
|
-
Requires-Dist: dask-expr; extra == 'test-downstream'
|
|
135
134
|
Requires-Dist: dask[dataframe,test]; extra == 'test-downstream'
|
|
136
135
|
Requires-Dist: moto[server]<5,>4; extra == 'test-downstream'
|
|
137
136
|
Requires-Dist: pytest-timeout; extra == 'test-downstream'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hello
|
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
2025.3.0
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
Enhancements
|
|
8
|
+
|
|
9
|
+
- add pipe_file to HTTP (#1799, 1801)
|
|
10
|
+
- add sync http for pyodide (#1177)
|
|
11
|
+
- ls performance for local and detail=False (#1789)
|
|
12
|
+
|
|
13
|
+
Fixes
|
|
14
|
+
|
|
15
|
+
- dir/info consistency in dirfs (#1798)
|
|
16
|
+
- referenceFS async consistency (#1794, 1795)
|
|
17
|
+
- CI (#1793)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
2025.2.0
|
|
21
|
+
--------
|
|
22
|
+
|
|
23
|
+
Enhancements
|
|
24
|
+
|
|
25
|
+
- add open() to referenceFS (#1778)
|
|
26
|
+
|
|
27
|
+
Fixes
|
|
28
|
+
|
|
29
|
+
- don't make async open() in async-wrapper (#1769)
|
|
30
|
+
- fix CI following dask-expr upstream change (#1781)
|
|
31
|
+
- cope with zarr3 "Buffer" objects in referenceFS (#1784)
|
|
32
|
+
|
|
33
|
+
Other
|
|
34
|
+
|
|
35
|
+
- use itemgetter in archiveFS (#1764)
|
|
36
|
+
- document that newline is included in readline(s) (#1770)
|
|
37
|
+
- format/spelling (#1774, 1779, 1780)
|
|
38
|
+
|
|
4
39
|
2024.12.0
|
|
5
40
|
---------
|
|
6
41
|
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
3
6
|
TYPE_CHECKING = False
|
|
4
7
|
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
12
|
else:
|
|
8
13
|
VERSION_TUPLE = object
|
|
@@ -12,5 +17,5 @@ __version__: str
|
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
|
13
18
|
version_tuple: VERSION_TUPLE
|
|
14
19
|
|
|
15
|
-
__version__ = version = '
|
|
16
|
-
__version_tuple__ = version_tuple = (
|
|
20
|
+
__version__ = version = '2025.3.0'
|
|
21
|
+
__version_tuple__ = version_tuple = (2025, 3, 0)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import operator
|
|
2
|
+
|
|
1
3
|
from fsspec import AbstractFileSystem
|
|
2
4
|
from fsspec.utils import tokenize
|
|
3
5
|
|
|
@@ -67,7 +69,7 @@ class AbstractArchiveFileSystem(AbstractFileSystem):
|
|
|
67
69
|
out = {"name": ppath, "size": 0, "type": "directory"}
|
|
68
70
|
paths[ppath] = out
|
|
69
71
|
if detail:
|
|
70
|
-
out = sorted(paths.values(), key=
|
|
72
|
+
out = sorted(paths.values(), key=operator.itemgetter("name"))
|
|
71
73
|
return out
|
|
72
74
|
else:
|
|
73
75
|
return sorted(paths)
|
|
@@ -452,7 +452,7 @@ def open(
|
|
|
452
452
|
newline: bytes or None
|
|
453
453
|
Used for line terminator in text mode. If None, uses system default;
|
|
454
454
|
if blank, uses no translation.
|
|
455
|
-
expand: bool or
|
|
455
|
+
expand: bool or None
|
|
456
456
|
Whether to regard file paths containing special glob characters as needing
|
|
457
457
|
expansion (finding the first match) or absolute. Setting False allows using
|
|
458
458
|
paths which do embed such characters. If None (default), this argument
|
|
@@ -2,7 +2,7 @@ import asyncio
|
|
|
2
2
|
import functools
|
|
3
3
|
import inspect
|
|
4
4
|
|
|
5
|
-
from fsspec.asyn import AsyncFileSystem
|
|
5
|
+
from fsspec.asyn import AsyncFileSystem, running_async
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def async_wrapper(func, obj=None):
|
|
@@ -42,10 +42,14 @@ class AsyncFileSystemWrapper(AsyncFileSystem):
|
|
|
42
42
|
The synchronous filesystem instance to wrap.
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
protocol = "async_wrapper"
|
|
46
|
+
cachable = False
|
|
47
|
+
|
|
48
|
+
def __init__(self, fs, *args, asynchronous=None, **kwargs):
|
|
49
|
+
if asynchronous is None:
|
|
50
|
+
asynchronous = running_async()
|
|
51
|
+
super().__init__(*args, asynchronous=asynchronous, **kwargs)
|
|
52
|
+
self.sync_fs = fs
|
|
49
53
|
self.protocol = self.sync_fs.protocol
|
|
50
54
|
self._wrap_all_sync_methods()
|
|
51
55
|
|
|
@@ -57,8 +61,9 @@ class AsyncFileSystemWrapper(AsyncFileSystem):
|
|
|
57
61
|
"""
|
|
58
62
|
Wrap all synchronous methods of the underlying filesystem with asynchronous versions.
|
|
59
63
|
"""
|
|
64
|
+
excluded_methods = {"open"}
|
|
60
65
|
for method_name in dir(self.sync_fs):
|
|
61
|
-
if method_name.startswith("_"):
|
|
66
|
+
if method_name.startswith("_") or method_name in excluded_methods:
|
|
62
67
|
continue
|
|
63
68
|
|
|
64
69
|
attr = inspect.getattr_static(self.sync_fs, method_name)
|
|
@@ -412,9 +412,9 @@ class DatabricksFile(AbstractBufferedFile):
|
|
|
412
412
|
if block_size is None or block_size == "default":
|
|
413
413
|
block_size = self.DEFAULT_BLOCK_SIZE
|
|
414
414
|
|
|
415
|
-
assert (
|
|
416
|
-
|
|
417
|
-
)
|
|
415
|
+
assert block_size == self.DEFAULT_BLOCK_SIZE, (
|
|
416
|
+
f"Only the default block size is allowed, not {block_size}"
|
|
417
|
+
)
|
|
418
418
|
|
|
419
419
|
super().__init__(
|
|
420
420
|
fs,
|
|
@@ -36,8 +36,6 @@ class DirFileSystem(AsyncFileSystem):
|
|
|
36
36
|
super().__init__(**storage_options)
|
|
37
37
|
if fs is None:
|
|
38
38
|
fs = filesystem(protocol=target_protocol, **(target_options or {}))
|
|
39
|
-
if (path is not None) ^ (fo is not None) is False:
|
|
40
|
-
raise ValueError("Provide path or fo, not both")
|
|
41
39
|
path = path or fo
|
|
42
40
|
|
|
43
41
|
if self.asynchronous and not fs.async_impl:
|
|
@@ -233,10 +231,16 @@ class DirFileSystem(AsyncFileSystem):
|
|
|
233
231
|
return self.fs.exists(self._join(path))
|
|
234
232
|
|
|
235
233
|
async def _info(self, path, **kwargs):
|
|
236
|
-
|
|
234
|
+
info = await self.fs._info(self._join(path), **kwargs)
|
|
235
|
+
info = info.copy()
|
|
236
|
+
info["name"] = self._relpath(info["name"])
|
|
237
|
+
return info
|
|
237
238
|
|
|
238
239
|
def info(self, path, **kwargs):
|
|
239
|
-
|
|
240
|
+
info = self.fs.info(self._join(path), **kwargs)
|
|
241
|
+
info = info.copy()
|
|
242
|
+
info["name"] = self._relpath(info["name"])
|
|
243
|
+
return info
|
|
240
244
|
|
|
241
245
|
async def _ls(self, path, detail=True, **kwargs):
|
|
242
246
|
ret = (await self.fs._ls(self._join(path), detail=detail, **kwargs)).copy()
|
|
@@ -522,6 +522,30 @@ class HTTPFileSystem(AsyncFileSystem):
|
|
|
522
522
|
except (FileNotFoundError, ValueError):
|
|
523
523
|
return False
|
|
524
524
|
|
|
525
|
+
async def _pipe_file(self, path, value, mode="overwrite", **kwargs):
|
|
526
|
+
"""
|
|
527
|
+
Write bytes to a remote file over HTTP.
|
|
528
|
+
|
|
529
|
+
Parameters
|
|
530
|
+
----------
|
|
531
|
+
path : str
|
|
532
|
+
Target URL where the data should be written
|
|
533
|
+
value : bytes
|
|
534
|
+
Data to be written
|
|
535
|
+
mode : str
|
|
536
|
+
How to write to the file - 'overwrite' or 'append'
|
|
537
|
+
**kwargs : dict
|
|
538
|
+
Additional parameters to pass to the HTTP request
|
|
539
|
+
"""
|
|
540
|
+
url = self._strip_protocol(path)
|
|
541
|
+
headers = kwargs.pop("headers", {})
|
|
542
|
+
headers["Content-Length"] = str(len(value))
|
|
543
|
+
|
|
544
|
+
session = await self.set_session()
|
|
545
|
+
|
|
546
|
+
async with session.put(url, data=value, headers=headers, **kwargs) as r:
|
|
547
|
+
r.raise_for_status()
|
|
548
|
+
|
|
525
549
|
|
|
526
550
|
class HTTPFile(AbstractBufferedFile):
|
|
527
551
|
"""
|