megfile 4.2.2__py3-none-any.whl → 4.2.3__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.
- megfile/lib/compare.py +3 -3
- megfile/lib/glob.py +3 -0
- megfile/s3_path.py +1 -0
- megfile/version.py +1 -1
- {megfile-4.2.2.dist-info → megfile-4.2.3.dist-info}/METADATA +1 -1
- {megfile-4.2.2.dist-info → megfile-4.2.3.dist-info}/RECORD +11 -11
- {megfile-4.2.2.dist-info → megfile-4.2.3.dist-info}/WHEEL +0 -0
- {megfile-4.2.2.dist-info → megfile-4.2.3.dist-info}/entry_points.txt +0 -0
- {megfile-4.2.2.dist-info → megfile-4.2.3.dist-info}/licenses/LICENSE +0 -0
- {megfile-4.2.2.dist-info → megfile-4.2.3.dist-info}/licenses/LICENSE.pyre +0 -0
- {megfile-4.2.2.dist-info → megfile-4.2.3.dist-info}/top_level.txt +0 -0
megfile/lib/compare.py
CHANGED
|
@@ -5,10 +5,10 @@ from megfile.pathlike import StatResult
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def get_sync_type(src_protocol, dst_protocol):
|
|
8
|
-
if
|
|
9
|
-
return "download"
|
|
10
|
-
elif src_protocol != "s3" and dst_protocol == "s3":
|
|
8
|
+
if dst_protocol == "s3" or dst_protocol.startswith("s3+"):
|
|
11
9
|
return "upload"
|
|
10
|
+
elif src_protocol == "s3" or src_protocol.startswith("s3+"):
|
|
11
|
+
return "download"
|
|
12
12
|
else:
|
|
13
13
|
return "copy"
|
|
14
14
|
|
megfile/lib/glob.py
CHANGED
|
@@ -289,6 +289,9 @@ def get_non_glob_dir(glob: str):
|
|
|
289
289
|
root_dir = []
|
|
290
290
|
if glob.startswith("/"):
|
|
291
291
|
root_dir.append("/")
|
|
292
|
+
elif "://" in glob:
|
|
293
|
+
protocol, glob = glob.split("://", 1)
|
|
294
|
+
root_dir.append(f"{protocol}://")
|
|
292
295
|
for name in glob.split("/"):
|
|
293
296
|
if has_magic(name):
|
|
294
297
|
break
|
megfile/s3_path.py
CHANGED
|
@@ -610,6 +610,7 @@ def _s3_glob_stat_single_path(
|
|
|
610
610
|
yield FileEntry(S3Path(path).name, path, _make_stat(content))
|
|
611
611
|
dirname = os.path.dirname(path)
|
|
612
612
|
while dirname not in dirnames and dirname != top_dir:
|
|
613
|
+
# TODO: optimize memory usage and file path order
|
|
613
614
|
dirnames.add(dirname)
|
|
614
615
|
path = dirname + "/" if search_dir else dirname
|
|
615
616
|
if pattern.match(path):
|
megfile/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "4.2.
|
|
1
|
+
VERSION = "4.2.3"
|
|
@@ -11,21 +11,21 @@ megfile/http_path.py,sha256=08OmzmRMyLSyq1Yr1K2HbzexesURJrIoA6AibwYzUiA,13844
|
|
|
11
11
|
megfile/interfaces.py,sha256=p4UvVZpeLx5djd6bqqDaygIx_s-_AxIVj-gudTch4JE,8467
|
|
12
12
|
megfile/pathlike.py,sha256=3Hnw-fn6RcIe9iPrJt00QdHSA--UfDyxnVBuZ_ymYYQ,31278
|
|
13
13
|
megfile/s3.py,sha256=abBxnI7RIyn7n7qjGszP1VruYd6Gi9I8QnUOvsHkx1Y,16325
|
|
14
|
-
megfile/s3_path.py,sha256=
|
|
14
|
+
megfile/s3_path.py,sha256=yulypUpJ2k0WzOPbeXyx8Q75YGJa3R5qXBt2QmMt9H0,93901
|
|
15
15
|
megfile/sftp.py,sha256=uBcLQs-j6Q-q-sWAdd-pgi5Qmb_kq7boJM-0sCfcNO0,26540
|
|
16
16
|
megfile/sftp_path.py,sha256=CgirHWmNdXdqyIL9ufmlaMpwFhlkQVZhqmfvjUaj7qU,43845
|
|
17
17
|
megfile/smart.py,sha256=GnabQVb_NU7a-etKfF-NgpJ9JM2rT0uZBeA9UoNz_wM,37014
|
|
18
18
|
megfile/smart_path.py,sha256=Up_6xNZ2019iSzMn_JAU_1H--z-AP6O7SxdXGdeTG0c,7659
|
|
19
19
|
megfile/stdio.py,sha256=ZwxsnJNJYIT7Iyg5pIw4qiyH8bszG6oAhEJuR-hXGG4,658
|
|
20
20
|
megfile/stdio_path.py,sha256=cxaDr8rtisTPnN-rjtaEpqQnshwiqwXFUJBM9xWY7Cg,2711
|
|
21
|
-
megfile/version.py,sha256=
|
|
21
|
+
megfile/version.py,sha256=DjJW-M4YIrKI_sFscLAPh7I9pVVFC24RH3yBxS8RkNI,19
|
|
22
22
|
megfile/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
megfile/lib/base_prefetch_reader.py,sha256=uxVwYknOjc8hLF7q_T2QKMsBqFcrf411ZsuK25CN1eQ,12848
|
|
24
24
|
megfile/lib/combine_reader.py,sha256=Kp2wEloOUpTlIU7dve87MBpSzmIM-F9OtpTawAjFkiU,4828
|
|
25
|
-
megfile/lib/compare.py,sha256=
|
|
25
|
+
megfile/lib/compare.py,sha256=CPSbyqsQ396oSfxa7h0NdUUqBw5A3WOn6fHrNKkuinw,2188
|
|
26
26
|
megfile/lib/compat.py,sha256=SynEeHluys3tCK-lb_1oV3o_ft83yZvunqM_AjibLgE,207
|
|
27
27
|
megfile/lib/fnmatch.py,sha256=4MvGzEahMRA-u8Z7mxaD-Yw1idOwBoJJpVywQy29jwY,4162
|
|
28
|
-
megfile/lib/glob.py,sha256=
|
|
28
|
+
megfile/lib/glob.py,sha256=BSpYm6w16rVuIBCI9hNOCxn83BN7UuKGBp2wFRFdwp4,9775
|
|
29
29
|
megfile/lib/hdfs_prefetch_reader.py,sha256=yCNpcXcTiC2SHKHC-Qp50KQx1ObSLmOgwNUKlG-4ADg,2131
|
|
30
30
|
megfile/lib/hdfs_tools.py,sha256=4K-OdMYFFSLBGmDzjatioHvuZuUbKVy7ACeJl-l0HLQ,435
|
|
31
31
|
megfile/lib/http_prefetch_reader.py,sha256=OQPZ7kWFImqpynjaiTtmadtgtab5fCeQmu51UYHZfgs,4135
|
|
@@ -43,10 +43,10 @@ megfile/lib/stdio_handler.py,sha256=IDdgENLQlhigEwkLL4zStueVSzdWg7xVcTF_koof_Ek,
|
|
|
43
43
|
megfile/lib/url.py,sha256=ER32pWy9Q2MAk3TraAaNEBWIqUeBmLuM57ol2cs7-Ks,103
|
|
44
44
|
megfile/utils/__init__.py,sha256=pawmXnCNokWLj338a60b_hK21koYavpEiEohZhsOaGQ,10156
|
|
45
45
|
megfile/utils/mutex.py,sha256=asb8opGLgK22RiuBJUnfsvB8LnMmodP8KzCVHKmQBWA,2561
|
|
46
|
-
megfile-4.2.
|
|
47
|
-
megfile-4.2.
|
|
48
|
-
megfile-4.2.
|
|
49
|
-
megfile-4.2.
|
|
50
|
-
megfile-4.2.
|
|
51
|
-
megfile-4.2.
|
|
52
|
-
megfile-4.2.
|
|
46
|
+
megfile-4.2.3.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
47
|
+
megfile-4.2.3.dist-info/licenses/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
48
|
+
megfile-4.2.3.dist-info/METADATA,sha256=EKObM2zjGcOsvRyMILjA4qgEvJg72mPB8icyZhBbZ9o,9601
|
|
49
|
+
megfile-4.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
50
|
+
megfile-4.2.3.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
51
|
+
megfile-4.2.3.dist-info/top_level.txt,sha256=i3rMgdU1ZAJekAceojhA-bkm3749PzshtRmLTbeLUPQ,8
|
|
52
|
+
megfile-4.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|