fs: remove unused CHUNK_SIZE var

There is no support for chunk_size kwarg in fs.open.
Also, `upload_fobj` is now able to figure out proper
chunk size from fileobj, so I don't think we need this on _upload_file.
This commit is contained in:
Saugat Pachhai (सौगात)
2022-04-27 19:06:46 +05:45
committed by Saugat Pachhai
parent 8b68e4fa75
commit 46fac33ba5
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ def _upload_file(from_fs_path, fs, odb, upload_odb, callback=None):
fs_path = upload_odb.fs.path
tmp_info = fs_path.join(upload_odb.fs_path, tmp_fname())
with fs.open(from_fs_path, mode="rb", chunk_size=fs.CHUNK_SIZE) as stream:
with fs.open(from_fs_path, mode="rb") as stream:
stream = HashedStreamReader(stream)
size = fs.size(from_fs_path)
with FsspecCallback.as_tqdm_callback(
-3
View File
@@ -64,9 +64,6 @@ class FileSystem:
TRAVERSE_THRESHOLD_SIZE = 500000
CAN_TRAVERSE = True
# Needed for some providers, and http open()
CHUNK_SIZE = 64 * 1024 * 1024 # 64 MiB
PARAM_CHECKSUM: ClassVar[Optional[str]] = None
def __init__(self, **kwargs):