p115client 0.0.5.10.9__py3-none-any.whl → 0.0.5.11.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.
- p115client/_upload.py +8 -8
- p115client/client.py +963 -256
- p115client/tool/attr.py +1 -1
- p115client/tool/download.py +86 -69
- p115client/tool/edit.py +3 -3
- p115client/tool/export_dir.py +22 -23
- p115client/tool/fs_files.py +4 -7
- p115client/tool/history.py +5 -5
- p115client/tool/iterdir.py +87 -88
- p115client/tool/life.py +12 -12
- p115client/tool/pool.py +5 -5
- p115client/tool/upload.py +4 -4
- p115client/tool/xys.py +10 -7
- {p115client-0.0.5.10.9.dist-info → p115client-0.0.5.11.1.dist-info}/METADATA +2 -2
- p115client-0.0.5.11.1.dist-info/RECORD +26 -0
- p115client-0.0.5.10.9.dist-info/RECORD +0 -26
- {p115client-0.0.5.10.9.dist-info → p115client-0.0.5.11.1.dist-info}/LICENSE +0 -0
- {p115client-0.0.5.10.9.dist-info → p115client-0.0.5.11.1.dist-info}/WHEEL +0 -0
p115client/_upload.py
CHANGED
@@ -281,11 +281,11 @@ def oss_multipart_part_iter(
|
|
281
281
|
**request_kwargs,
|
282
282
|
)
|
283
283
|
for el in etree.iterfind("Part"):
|
284
|
-
yield Yield({sel.tag: maybe_integer(sel.text) for sel in el},
|
284
|
+
yield Yield({sel.tag: maybe_integer(sel.text) for sel in el}, may_await=False)
|
285
285
|
if getattr(etree.find("IsTruncated"), "text") == "false":
|
286
286
|
break
|
287
287
|
params["part-number-marker"] = getattr(etree.find("NextPartNumberMarker"), "text")
|
288
|
-
return run_gen_step_iter(gen_step, async_=async_)
|
288
|
+
return run_gen_step_iter(gen_step, simple=True, async_=async_)
|
289
289
|
|
290
290
|
|
291
291
|
@overload
|
@@ -679,7 +679,7 @@ def oss_multipart_upload_part_iter(
|
|
679
679
|
))
|
680
680
|
if part["Size"] < partsize:
|
681
681
|
break
|
682
|
-
return run_gen_step_iter(gen_step, async_=async_)
|
682
|
+
return run_gen_step_iter(gen_step, simple=True, async_=async_)
|
683
683
|
|
684
684
|
|
685
685
|
@overload
|
@@ -846,7 +846,7 @@ def oss_multipart_upload(
|
|
846
846
|
if part["Size"] != partsize:
|
847
847
|
break
|
848
848
|
add_part(part)
|
849
|
-
yield async_request
|
849
|
+
yield async_request()
|
850
850
|
else:
|
851
851
|
for part in oss_multipart_part_iter(
|
852
852
|
request,
|
@@ -885,14 +885,14 @@ def oss_multipart_upload(
|
|
885
885
|
elif isinstance(reporthook, AsyncGenerator):
|
886
886
|
close_reporthook = reporthook.aclose
|
887
887
|
reporthook = reporthook.asend
|
888
|
-
yield
|
888
|
+
yield reporthook(None)
|
889
889
|
try:
|
890
890
|
resume_data: MultipartResumeData = {
|
891
891
|
"bucket": bucket, "object": object, "token": token, "callback": callback,
|
892
892
|
"upload_id": upload_id, "partsize": partsize, "filesize": filesize, "parts": parts,
|
893
893
|
}
|
894
894
|
if collect_resume_data is not None:
|
895
|
-
yield
|
895
|
+
yield collect_resume_data(resume_data)
|
896
896
|
yield foreach(
|
897
897
|
add_part,
|
898
898
|
oss_multipart_upload_part_iter(
|
@@ -926,8 +926,8 @@ def oss_multipart_upload(
|
|
926
926
|
raise MultipartUploadAbort(resume_data) from e
|
927
927
|
finally:
|
928
928
|
if close_reporthook is not None:
|
929
|
-
yield close_reporthook
|
930
|
-
return run_gen_step(gen_step, async_=async_)
|
929
|
+
yield close_reporthook()
|
930
|
+
return run_gen_step(gen_step, simple=True, async_=async_)
|
931
931
|
|
932
932
|
|
933
933
|
# class MultipartUploader:
|