megfile 4.1.5__py3-none-any.whl → 4.1.6__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/errors.py +9 -5
- megfile/version.py +1 -1
- {megfile-4.1.5.dist-info → megfile-4.1.6.dist-info}/METADATA +1 -1
- {megfile-4.1.5.dist-info → megfile-4.1.6.dist-info}/RECORD +9 -9
- {megfile-4.1.5.dist-info → megfile-4.1.6.dist-info}/WHEEL +1 -1
- {megfile-4.1.5.dist-info → megfile-4.1.6.dist-info}/entry_points.txt +0 -0
- {megfile-4.1.5.dist-info → megfile-4.1.6.dist-info}/licenses/LICENSE +0 -0
- {megfile-4.1.5.dist-info → megfile-4.1.6.dist-info}/licenses/LICENSE.pyre +0 -0
- {megfile-4.1.5.dist-info → megfile-4.1.6.dist-info}/top_level.txt +0 -0
megfile/errors.py
CHANGED
|
@@ -165,7 +165,8 @@ def patch_method(
|
|
|
165
165
|
result = func(*args, **kwargs)
|
|
166
166
|
if after_callback is not None:
|
|
167
167
|
result = after_callback(result, *args, **kwargs)
|
|
168
|
-
|
|
168
|
+
if retries > 1:
|
|
169
|
+
_logger.info(f"Error already fixed by retry {retries - 1} times")
|
|
169
170
|
return result
|
|
170
171
|
except Exception as error:
|
|
171
172
|
if not should_retry(error):
|
|
@@ -173,12 +174,15 @@ def patch_method(
|
|
|
173
174
|
if retry_callback is not None:
|
|
174
175
|
retry_callback(error, *args, **kwargs)
|
|
175
176
|
if retries == max_retries:
|
|
177
|
+
_logger.error(
|
|
178
|
+
f"Cannot handle error {full_error_message(error)} "
|
|
179
|
+
f"after {retries} tries"
|
|
180
|
+
)
|
|
176
181
|
raise
|
|
177
182
|
retry_interval = min(0.1 * 2**retries, 30)
|
|
178
183
|
_logger.info(
|
|
179
|
-
"unknown error encountered:
|
|
180
|
-
"after
|
|
181
|
-
% (full_error_message(error), retry_interval, retries)
|
|
184
|
+
f"unknown error encountered: {full_error_message(error)}, "
|
|
185
|
+
f"retry in {retry_interval:.1f}s after {retries} tries"
|
|
182
186
|
)
|
|
183
187
|
time.sleep(retry_interval)
|
|
184
188
|
|
|
@@ -312,7 +316,7 @@ class HttpBodyIncompleteError(HttpException):
|
|
|
312
316
|
|
|
313
317
|
http_retry_exceptions = (
|
|
314
318
|
requests.exceptions.ReadTimeout,
|
|
315
|
-
requests.exceptions.
|
|
319
|
+
requests.exceptions.ConnectionError,
|
|
316
320
|
requests.exceptions.ChunkedEncodingError,
|
|
317
321
|
requests.exceptions.HTTPError,
|
|
318
322
|
requests.exceptions.ProxyError,
|
megfile/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "4.1.
|
|
1
|
+
VERSION = "4.1.6"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
megfile/__init__.py,sha256=7oEfu410CFKzDWZ9RjL5xEJ1gtkJkTfvPrL_7TWdJuY,7366
|
|
2
2
|
megfile/cli.py,sha256=iwwlwVNu_yXgqnaURPHqGPrx1WeReqN0zi9C4rqK5Ag,29178
|
|
3
3
|
megfile/config.py,sha256=2MMj5QkhlDJQFZRbCQL2c9iDdeMAVctiaPszRBkg5vM,3988
|
|
4
|
-
megfile/errors.py,sha256=
|
|
4
|
+
megfile/errors.py,sha256=aw4BX-pU1uj0-dNc6Tq-IeSwK_PWJNi2ZL5ZcRSo7aQ,14739
|
|
5
5
|
megfile/fs.py,sha256=KMEqAE35alpcxiy6du5nPFYcaorhUM_kPJMah3q76ng,19160
|
|
6
6
|
megfile/fs_path.py,sha256=Hozl9LAJ8EMuSWBSZXGj2GNmPZ1sJp9PZs-7hPrLgm8,39341
|
|
7
7
|
megfile/hdfs.py,sha256=owXr4d3j1frCvlbhmhENcSBnKKDky5cJZzWLOF4ZJMo,13251
|
|
@@ -18,7 +18,7 @@ megfile/smart.py,sha256=Sae2KJzaU0k_qV_Bk0YifOMq8WsV5qQ2pGInDRF546I,36411
|
|
|
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=IhKvX1UU6Hj5y2NPRPLmOC6AwOxQcN87pBebR6XrP7I,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
|
|
@@ -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.1.
|
|
47
|
-
megfile-4.1.
|
|
48
|
-
megfile-4.1.
|
|
49
|
-
megfile-4.1.
|
|
50
|
-
megfile-4.1.
|
|
51
|
-
megfile-4.1.
|
|
52
|
-
megfile-4.1.
|
|
46
|
+
megfile-4.1.6.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
47
|
+
megfile-4.1.6.dist-info/licenses/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
48
|
+
megfile-4.1.6.dist-info/METADATA,sha256=_YzyQHnfYQYQRtbqc5__xrF5AtBBdIBDMs0WujErjBk,9595
|
|
49
|
+
megfile-4.1.6.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
|
|
50
|
+
megfile-4.1.6.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
51
|
+
megfile-4.1.6.dist-info/top_level.txt,sha256=i3rMgdU1ZAJekAceojhA-bkm3749PzshtRmLTbeLUPQ,8
|
|
52
|
+
megfile-4.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|