megfile 4.0.0__py3-none-any.whl → 4.0.0.post1__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/fs.py +0 -1
- megfile/fs_path.py +0 -1
- megfile/lib/s3_buffered_writer.py +7 -4
- megfile/version.py +1 -1
- {megfile-4.0.0.dist-info → megfile-4.0.0.post1.dist-info}/METADATA +1 -1
- {megfile-4.0.0.dist-info → megfile-4.0.0.post1.dist-info}/RECORD +11 -11
- {megfile-4.0.0.dist-info → megfile-4.0.0.post1.dist-info}/LICENSE +0 -0
- {megfile-4.0.0.dist-info → megfile-4.0.0.post1.dist-info}/LICENSE.pyre +0 -0
- {megfile-4.0.0.dist-info → megfile-4.0.0.post1.dist-info}/WHEEL +0 -0
- {megfile-4.0.0.dist-info → megfile-4.0.0.post1.dist-info}/entry_points.txt +0 -0
- {megfile-4.0.0.dist-info → megfile-4.0.0.post1.dist-info}/top_level.txt +0 -0
megfile/fs.py
CHANGED
megfile/fs_path.py
CHANGED
|
@@ -155,7 +155,7 @@ class S3BufferedWriter(Writable[bytes]):
|
|
|
155
155
|
len(content),
|
|
156
156
|
)
|
|
157
157
|
|
|
158
|
-
def _submit_upload_buffer(self, part_number, content):
|
|
158
|
+
def _submit_upload_buffer(self, part_number: int, content: bytes):
|
|
159
159
|
self._uploading_futures.add(
|
|
160
160
|
self._executor.submit(self._upload_buffer, part_number, content)
|
|
161
161
|
)
|
|
@@ -176,13 +176,16 @@ class S3BufferedWriter(Writable[bytes]):
|
|
|
176
176
|
# so we need to divide content into equal-size parts,
|
|
177
177
|
# and give last part more size.
|
|
178
178
|
# e.g. 257MB can be divided into 2 parts, 128MB and 129MB
|
|
179
|
-
|
|
179
|
+
block_size = self._block_size
|
|
180
|
+
while len(content) - block_size > self.MIN_BLOCK_SIZE:
|
|
180
181
|
self._part_number += 1
|
|
181
182
|
current_content, content = (
|
|
182
|
-
content[:
|
|
183
|
-
content[
|
|
183
|
+
content[:block_size],
|
|
184
|
+
content[block_size:],
|
|
184
185
|
)
|
|
185
186
|
self._submit_upload_buffer(self._part_number, current_content)
|
|
187
|
+
block_size = self._block_size
|
|
188
|
+
|
|
186
189
|
if content:
|
|
187
190
|
self._part_number += 1
|
|
188
191
|
self._submit_upload_buffer(self._part_number, content)
|
megfile/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "4.0.0"
|
|
1
|
+
VERSION = "4.0.0.post1"
|
|
@@ -2,8 +2,8 @@ megfile/__init__.py,sha256=i2Lbq_VxIgppaqwkxG0_H35dRfcjJ4mCYWjprOf4hHo,7318
|
|
|
2
2
|
megfile/cli.py,sha256=yRRd555mk-yxxg0XShnot068oEuvX1E4qY-hb-uVLcc,23549
|
|
3
3
|
megfile/config.py,sha256=kcnqVGrUKSuZ3YqLHpeJPYj94WO2SIH2S6n755lUXew,1942
|
|
4
4
|
megfile/errors.py,sha256=a55qKQgyfiLmV-qnojUFzq2gu9JXpj3ZiC2qVaWyUTA,14160
|
|
5
|
-
megfile/fs.py,sha256=
|
|
6
|
-
megfile/fs_path.py,sha256=
|
|
5
|
+
megfile/fs.py,sha256=bPGbapv41FzME87X3MhSNQRjNmHrI23FuFnjPT0ukQs,18239
|
|
6
|
+
megfile/fs_path.py,sha256=ZK-po1xqhHocMb9Vrxf5K9tDx3zxQmGxNIHY3Z7Akp8,39085
|
|
7
7
|
megfile/hdfs.py,sha256=JfqTTvMzTeDFAJ-uq5BU0sjFaE3qshlVZ0_5h9oImfA,13361
|
|
8
8
|
megfile/hdfs_path.py,sha256=_ir7En78K0nZudVOL7yYcKZgBQRZwlMDvWTRmYXEfOE,25637
|
|
9
9
|
megfile/http.py,sha256=1nuGe-JbnwMFyV3s35CJxByED3uoRoS9y8Y8cSGP9Kw,3865
|
|
@@ -18,7 +18,7 @@ megfile/smart.py,sha256=WS9ZZbMAMPrOR2z8sb8hxVYCVsCRMhGGUvcboQjCkBw,36771
|
|
|
18
18
|
megfile/smart_path.py,sha256=Bqg95T2-XZrRXWhH7GT-jMCYzD7i1SIXdczQxtOxiPs,7583
|
|
19
19
|
megfile/stdio.py,sha256=C_cGID_npthpwoPcsJMMEqqbVUPUnDxxJV9jLY2_D7c,635
|
|
20
20
|
megfile/stdio_path.py,sha256=L8ODNIwO79UIv13YYc2OTr6f4XTv4ZPyvBeRk83-AjA,2700
|
|
21
|
-
megfile/version.py,sha256=
|
|
21
|
+
megfile/version.py,sha256=4XWC9d4BvU4TuG3QOaPY1dppiaFLKYtd6zGozoT0xdM,25
|
|
22
22
|
megfile/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
megfile/lib/base_prefetch_reader.py,sha256=6Dy2ZwlowqAvyUUa7bpQLCKOclmmUDhqEF-_CDDp0Og,13100
|
|
24
24
|
megfile/lib/combine_reader.py,sha256=nKGAug29lOpNIZuLKu7_qVrJJRpXL_J4jxLglWbGJ1w,4808
|
|
@@ -31,7 +31,7 @@ megfile/lib/hdfs_tools.py,sha256=4K-OdMYFFSLBGmDzjatioHvuZuUbKVy7ACeJl-l0HLQ,435
|
|
|
31
31
|
megfile/lib/http_prefetch_reader.py,sha256=OjP5pdWK_e1QiFIt2xmflceLnrz3S7B7ePBZFK-OwQE,4558
|
|
32
32
|
megfile/lib/joinpath.py,sha256=gaPNtBi8fzd5LZNyZp5zrHzaybcqKJ1xlntGmVNyFEM,929
|
|
33
33
|
megfile/lib/lazy_handler.py,sha256=bE7RGt1x_xYWMgGAvHr7dwEt52qy-D3z90X3oyCvE6g,1875
|
|
34
|
-
megfile/lib/s3_buffered_writer.py,sha256=
|
|
34
|
+
megfile/lib/s3_buffered_writer.py,sha256=kXvz1bdoaVIxjnEQeg4dxEzAXMYNrk-5uIMww86ty00,7860
|
|
35
35
|
megfile/lib/s3_cached_handler.py,sha256=X8PdeRC-BY6eSmOO5f2BeyjTPxyEwNtHgmAm9VgmDR4,1426
|
|
36
36
|
megfile/lib/s3_limited_seekable_writer.py,sha256=mUeoTS98LHluwDN7zxdCVcsjOGBT1bOYV8nRvi9QMGE,6212
|
|
37
37
|
megfile/lib/s3_memory_handler.py,sha256=4uzBzz2jfRI_u6jl0CpOGAhpNJhDQo18FSAweauCUFs,4136
|
|
@@ -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=sATf_NlsSTYIMEiA8-gM6K1M-Q1K6_7rx2VM31hrqaA,10838
|
|
45
45
|
megfile/utils/mutex.py,sha256=asb8opGLgK22RiuBJUnfsvB8LnMmodP8KzCVHKmQBWA,2561
|
|
46
|
-
megfile-4.0.0.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
47
|
-
megfile-4.0.0.dist-info/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
48
|
-
megfile-4.0.0.dist-info/METADATA,sha256
|
|
49
|
-
megfile-4.0.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
50
|
-
megfile-4.0.0.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
51
|
-
megfile-4.0.0.dist-info/top_level.txt,sha256=IaHHoRXeemLL6kTM5YuC3H0UyOnTdZH9J324TkeBneo,36
|
|
52
|
-
megfile-4.0.0.dist-info/RECORD,,
|
|
46
|
+
megfile-4.0.0.post1.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
47
|
+
megfile-4.0.0.post1.dist-info/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
48
|
+
megfile-4.0.0.post1.dist-info/METADATA,sha256=wBX578pPpvPTAxGBK4kiszH6Qi7kwhUMruNOOIIFQHE,9234
|
|
49
|
+
megfile-4.0.0.post1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
50
|
+
megfile-4.0.0.post1.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
51
|
+
megfile-4.0.0.post1.dist-info/top_level.txt,sha256=IaHHoRXeemLL6kTM5YuC3H0UyOnTdZH9J324TkeBneo,36
|
|
52
|
+
megfile-4.0.0.post1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|