rclone-api 1.3.24__tar.gz → 1.3.26__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.
- {rclone_api-1.3.24 → rclone_api-1.3.26}/PKG-INFO +1 -1
- {rclone_api-1.3.24 → rclone_api-1.3.26}/pyproject.toml +1 -1
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/s3/chunk_task.py +3 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/types.py +49 -1
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api.egg-info/PKG-INFO +1 -1
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.aiderignore +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.github/workflows/lint.yml +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.github/workflows/push_macos.yml +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.github/workflows/push_ubuntu.yml +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.github/workflows/push_win.yml +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.gitignore +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.pylintrc +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.vscode/launch.json +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.vscode/settings.json +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/.vscode/tasks.json +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/LICENSE +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/MANIFEST.in +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/README.md +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/clean +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/install +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/lint +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/requirements.testing.txt +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/setup.cfg +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/setup.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/__init__.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/assets/example.txt +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/cli.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/cmd/analyze.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/cmd/copy_large_s3.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/cmd/list_files.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/cmd/save_to_db.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/completed_process.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/config.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/convert.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/db/__init__.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/db/db.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/db/models.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/deprecated.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/diff.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/dir.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/dir_listing.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/exec.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/experimental/flags.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/experimental/flags_base.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/file.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/file_item.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/filelist.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/group_files.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/http_server.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/log.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/mount.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/mount_read_chunker.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/process.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/profile/mount_copy_bytes.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/rclone.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/remote.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/rpath.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/s3/api.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/s3/basic_ops.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/s3/chunk_types.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/s3/create.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/s3/types.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/s3/upload_file_multipart.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/scan_missing_folders.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/util.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api/walk.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api.egg-info/SOURCES.txt +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api.egg-info/dependency_links.txt +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api.egg-info/entry_points.txt +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api.egg-info/requires.txt +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/src/rclone_api.egg-info/top_level.txt +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/test +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/archive/test_paramiko.py.disabled +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_cmd_list_files.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_copy.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_copy_bytes.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_copy_file_resumable_s3.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_copy_files.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_db.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_diff.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_file_item.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_group_files.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_is_synced.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_ls.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_ls_stream_files.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_mount.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_mount_s3.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_obscure.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_rclone_config.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_remote_control.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_remotes.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_s3.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_scan_missing_folders.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_serve_http.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_size_files.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_size_suffix.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tests/test_walk.py +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/tox.ini +0 -0
- {rclone_api-1.3.24 → rclone_api-1.3.26}/upload_package.sh +0 -0
@@ -184,6 +184,9 @@ def file_chunker(
|
|
184
184
|
logger.info(
|
185
185
|
f"Reading chunk {curr_part_number} of {num_parts} for {file_path}"
|
186
186
|
)
|
187
|
+
logger.debug(
|
188
|
+
f"Fetching part {curr_part_number} with offset {offset} and size {fetch_size}"
|
189
|
+
)
|
187
190
|
fut = fetcher(
|
188
191
|
offset, fetch_size, S3FileInfo(upload_info.upload_id, curr_part_number)
|
189
192
|
)
|
@@ -6,7 +6,7 @@ import warnings
|
|
6
6
|
from dataclasses import dataclass
|
7
7
|
from enum import Enum
|
8
8
|
from pathlib import Path
|
9
|
-
from threading import Lock
|
9
|
+
from threading import Lock, Thread
|
10
10
|
from typing import Any
|
11
11
|
|
12
12
|
|
@@ -288,10 +288,52 @@ def _on_exit_cleanup() -> None:
|
|
288
288
|
atexit.register(_on_exit_cleanup)
|
289
289
|
|
290
290
|
|
291
|
+
_FILEPARTS: list["FilePart"] = []
|
292
|
+
|
293
|
+
_FILEPARTS_LOCK = Lock()
|
294
|
+
def _add_filepart(part: "FilePart") -> None:
|
295
|
+
with _FILEPARTS_LOCK:
|
296
|
+
if part not in _FILEPARTS:
|
297
|
+
_FILEPARTS.append(part)
|
298
|
+
|
299
|
+
def _remove_filepart(part: "FilePart") -> None:
|
300
|
+
with _FILEPARTS_LOCK:
|
301
|
+
if part in _FILEPARTS:
|
302
|
+
_FILEPARTS.remove(part)
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
class ListFileParts(Thread):
|
307
|
+
def __init__(self):
|
308
|
+
super().__init__(daemon=True)
|
309
|
+
self.start()
|
310
|
+
|
311
|
+
def run(self):
|
312
|
+
while True:
|
313
|
+
print("File parts:")
|
314
|
+
for part in _FILEPARTS:
|
315
|
+
print(part)
|
316
|
+
print(part.stacktrace)
|
317
|
+
print("\n")
|
318
|
+
print("\n\n")
|
319
|
+
time.sleep(5)
|
320
|
+
|
321
|
+
|
322
|
+
dbg_thread = ListFileParts()
|
323
|
+
|
324
|
+
|
291
325
|
class FilePart:
|
292
326
|
def __init__(self, payload: Path | bytes | Exception, extra: Any) -> None:
|
327
|
+
import traceback
|
328
|
+
|
293
329
|
from rclone_api.util import random_str
|
294
330
|
|
331
|
+
stacktrace = traceback.format_stack()
|
332
|
+
stacktrace_str = "".join(stacktrace)
|
333
|
+
self.stacktrace = stacktrace_str
|
334
|
+
# _FILEPARTS.append(self)
|
335
|
+
_add_filepart(self)
|
336
|
+
|
295
337
|
self.extra = extra
|
296
338
|
self._lock = Lock()
|
297
339
|
self.payload: Path | Exception
|
@@ -347,6 +389,8 @@ class FilePart:
|
|
347
389
|
return isinstance(self.payload, Exception)
|
348
390
|
|
349
391
|
def dispose(self) -> None:
|
392
|
+
# _FILEPARTS.remove(self)
|
393
|
+
_remove_filepart(self)
|
350
394
|
print("Disposing file part")
|
351
395
|
with self._lock:
|
352
396
|
if isinstance(self.payload, Exception):
|
@@ -370,3 +414,7 @@ class FilePart:
|
|
370
414
|
|
371
415
|
def __del__(self):
|
372
416
|
self.dispose()
|
417
|
+
|
418
|
+
def __repr__(self):
|
419
|
+
payload_str = "err" if self.is_error() else f"{SizeSuffix(self.n_bytes())}"
|
420
|
+
return f"FilePart(payload={payload_str}, extra={self.extra})"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|