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 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
- _logger.info(f"Error already fixed by retry {retries - 1} times")
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: %s, retry in %0.1f seconds "
180
- "after %d tries"
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.ConnectTimeout,
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.5"
1
+ VERSION = "4.1.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: megfile
3
- Version: 4.1.5
3
+ Version: 4.1.6
4
4
  Summary: Megvii file operation library
5
5
  Author-email: megvii <megfile@megvii.com>
6
6
  Project-URL: Homepage, https://github.com/megvii-research/megfile
@@ -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=Wu6iTzbMt3lxqmIw7ayGp-cfIgKLfcRX2nTg8uDSufM,14553
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=adupe9YdXeuX1_csz0joHWbSaFM0bYND2lRZQYlkboI,19
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.5.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
47
- megfile-4.1.5.dist-info/licenses/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
48
- megfile-4.1.5.dist-info/METADATA,sha256=ZKN5sc5XLpDAZqtkDyhFgjSdhXkrYMhGHmRPVEWmZsE,9595
49
- megfile-4.1.5.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
50
- megfile-4.1.5.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
51
- megfile-4.1.5.dist-info/top_level.txt,sha256=i3rMgdU1ZAJekAceojhA-bkm3749PzshtRmLTbeLUPQ,8
52
- megfile-4.1.5.dist-info/RECORD,,
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5