megfile 3.1.0.post1__py3-none-any.whl → 3.1.0.post2__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/s3_path.py +6 -4
- megfile/smart.py +2 -2
- megfile/version.py +1 -1
- {megfile-3.1.0.post1.dist-info → megfile-3.1.0.post2.dist-info}/METADATA +1 -1
- {megfile-3.1.0.post1.dist-info → megfile-3.1.0.post2.dist-info}/RECORD +10 -10
- {megfile-3.1.0.post1.dist-info → megfile-3.1.0.post2.dist-info}/WHEEL +1 -1
- {megfile-3.1.0.post1.dist-info → megfile-3.1.0.post2.dist-info}/LICENSE +0 -0
- {megfile-3.1.0.post1.dist-info → megfile-3.1.0.post2.dist-info}/LICENSE.pyre +0 -0
- {megfile-3.1.0.post1.dist-info → megfile-3.1.0.post2.dist-info}/entry_points.txt +0 -0
- {megfile-3.1.0.post1.dist-info → megfile-3.1.0.post2.dist-info}/top_level.txt +0 -0
megfile/s3_path.py
CHANGED
|
@@ -779,12 +779,12 @@ def s3_buffered_open(
|
|
|
779
779
|
max_concurrency: Optional[int] = None,
|
|
780
780
|
max_buffer_size: int = DEFAULT_MAX_BUFFER_SIZE,
|
|
781
781
|
forward_ratio: Optional[float] = None,
|
|
782
|
-
block_size: int =
|
|
782
|
+
block_size: Optional[int] = None,
|
|
783
783
|
limited_seekable: bool = False,
|
|
784
784
|
buffered: bool = False,
|
|
785
785
|
share_cache_key: Optional[str] = None,
|
|
786
786
|
cache_path: Optional[str] = None,
|
|
787
|
-
min_block_size: int =
|
|
787
|
+
min_block_size: Optional[int] = None,
|
|
788
788
|
max_block_size: int = DEFAULT_MAX_BLOCK_SIZE) -> IO:
|
|
789
789
|
'''Open an asynchronous prefetch reader, to support fast sequential read
|
|
790
790
|
|
|
@@ -814,6 +814,8 @@ def s3_buffered_open(
|
|
|
814
814
|
s3_url = s3_url.readlink()
|
|
815
815
|
except S3NotALinkError:
|
|
816
816
|
pass
|
|
817
|
+
min_block_size = min_block_size or block_size or DEFAULT_MIN_BLOCK_SIZE
|
|
818
|
+
block_size = block_size or DEFAULT_BLOCK_SIZE
|
|
817
819
|
|
|
818
820
|
bucket, key = parse_s3_url(s3_url.path_with_protocol)
|
|
819
821
|
config = botocore.config.Config(max_pool_connections=max_pool_connections)
|
|
@@ -1124,9 +1126,9 @@ class S3Cacher(FileCacher):
|
|
|
1124
1126
|
self, path: str, cache_path: Optional[str] = None, mode: str = 'r'):
|
|
1125
1127
|
if mode not in ('r', 'w', 'a'):
|
|
1126
1128
|
raise ValueError('unacceptable mode: %r' % mode)
|
|
1129
|
+
if cache_path is None:
|
|
1130
|
+
cache_path = generate_cache_path(path)
|
|
1127
1131
|
if mode in ('r', 'a'):
|
|
1128
|
-
if cache_path is None:
|
|
1129
|
-
cache_path = generate_cache_path(path)
|
|
1130
1132
|
s3_download(path, cache_path)
|
|
1131
1133
|
self.name = path
|
|
1132
1134
|
self.mode = mode
|
megfile/smart.py
CHANGED
|
@@ -966,9 +966,9 @@ class SmartCacher(FileCacher):
|
|
|
966
966
|
self, path: str, cache_path: Optional[str] = None, mode: str = 'r'):
|
|
967
967
|
if mode not in ('r', 'w', 'a'):
|
|
968
968
|
raise ValueError('unacceptable mode: %r' % mode)
|
|
969
|
+
if cache_path is None:
|
|
970
|
+
cache_path = generate_cache_path(path)
|
|
969
971
|
if mode in ('r', 'a'):
|
|
970
|
-
if cache_path is None:
|
|
971
|
-
cache_path = generate_cache_path(path)
|
|
972
972
|
smart_copy(path, cache_path)
|
|
973
973
|
self.name = path
|
|
974
974
|
self.mode = mode
|
megfile/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "3.1.0.
|
|
1
|
+
VERSION = "3.1.0.post2"
|
|
@@ -12,14 +12,14 @@ megfile/http_path.py,sha256=mnoN5hHJro23cLny1r5ePMJ28r2gnBrzqA0S-grpwrE,16215
|
|
|
12
12
|
megfile/interfaces.py,sha256=PLNv0hDBTrTFJGTwT5mbDKYTsCjNryrHHMJCYhL9Wp0,8522
|
|
13
13
|
megfile/pathlike.py,sha256=FjY88X1IA4-ue5jcekwlIO740D0oT_wNo95y3eo6vNA,30685
|
|
14
14
|
megfile/s3.py,sha256=JfYWFHNJrBAoncB5RPDMyhjrIwVYGZ2lh8prGst-L_M,12874
|
|
15
|
-
megfile/s3_path.py,sha256=
|
|
15
|
+
megfile/s3_path.py,sha256=UV-rOV-j1uWhTjsClqNmYbqpPrrBd0CZldo717pd63o,93107
|
|
16
16
|
megfile/sftp.py,sha256=cXS1LZh4gtJgDCmR9p2_uM1wlycV34ebuTJGaceatVE,12984
|
|
17
17
|
megfile/sftp_path.py,sha256=QcV4DK192c5GL2CeK07JgpELpBXpGVAKswQ1JtZ2DZQ,53336
|
|
18
|
-
megfile/smart.py,sha256=
|
|
18
|
+
megfile/smart.py,sha256=jOTBBbDKpLuRbob9-Omj_GRsk66Vpql7LPJX4xCm5fs,36024
|
|
19
19
|
megfile/smart_path.py,sha256=OMTM9JeowIa6j2Yn8XEH-HS4gWD3gBkKgSj8GBD08Bk,6734
|
|
20
20
|
megfile/stdio.py,sha256=rsBMGr4LaFYOQjL-6k4GE_WznLsa8cPzMhSVNEEDh5o,671
|
|
21
21
|
megfile/stdio_path.py,sha256=2n3gTEN1-7d8cCRsQJ7zj8rdP1VPlgr78oSClYndxXI,2806
|
|
22
|
-
megfile/version.py,sha256=
|
|
22
|
+
megfile/version.py,sha256=ae-mMzuH1fX-ttz5eeJLdyu4AWB_y_CTVSIASAW4msI,25
|
|
23
23
|
megfile/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
megfile/lib/base_prefetch_reader.py,sha256=iTHdWvpERMELgv2sEAsf9tiiJFDYp2mHzodszFrB9T4,13213
|
|
25
25
|
megfile/lib/combine_reader.py,sha256=dV1AblB8LTHK2a4aM03w1eBEcTpxMBWln9g_fuz0v7Y,4561
|
|
@@ -46,10 +46,10 @@ megfile/utils/__init__.py,sha256=QFDDhVAmptdMzYE91O6GRARHTalj_ZfSKZNF71uCj7w,885
|
|
|
46
46
|
megfile/utils/mutex.py,sha256=-2KH3bNovKRd9zvsXq9n3bWM7rQdoG9hO7tUPxVG_Po,2538
|
|
47
47
|
scripts/convert_results_to_sarif.py,sha256=SI0vw4TrpJ9gAZ2pH8ywu-lXMYeZ-TYW2dLEHw5Rx84,4218
|
|
48
48
|
scripts/generate_file.py,sha256=OLAH9iZKQlHTjuV8zpC6exCXLS6bNdu4Njoc3IKO9Sc,10173
|
|
49
|
-
megfile-3.1.0.
|
|
50
|
-
megfile-3.1.0.
|
|
51
|
-
megfile-3.1.0.
|
|
52
|
-
megfile-3.1.0.
|
|
53
|
-
megfile-3.1.0.
|
|
54
|
-
megfile-3.1.0.
|
|
55
|
-
megfile-3.1.0.
|
|
49
|
+
megfile-3.1.0.post2.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
50
|
+
megfile-3.1.0.post2.dist-info/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
51
|
+
megfile-3.1.0.post2.dist-info/METADATA,sha256=0uNjuwKWUR2rcoeKxcUPFexqf2fysX_igYT4uUBrZ0I,9112
|
|
52
|
+
megfile-3.1.0.post2.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
|
53
|
+
megfile-3.1.0.post2.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
54
|
+
megfile-3.1.0.post2.dist-info/top_level.txt,sha256=oTnYXo1Z3V61qSWAKtnY9RkDgRSHvfRN38FQae6E0W0,50
|
|
55
|
+
megfile-3.1.0.post2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|