p115client 0.0.5.10.1__py3-none-any.whl → 0.0.5.10.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.
p115client/client.py CHANGED
@@ -5474,8 +5474,7 @@ class P115Client(P115OpenClient):
5474
5474
  request_kwargs["session"] = self.async_session if async_ else self.session
5475
5475
  request_kwargs["async_"] = async_
5476
5476
  request = get_default_request()
5477
- else:
5478
- headers.merge(self.headers)
5477
+ headers.merge(self.headers)
5479
5478
  if is_open_api:
5480
5479
  headers["cookie"] = ""
5481
5480
  if m := CRE_API_match(url):
p115client/tool/pool.py CHANGED
@@ -24,7 +24,7 @@ from p115client import check_response, P115Client
24
24
  from p115client.const import AVAILABLE_APP_IDS
25
25
  from p115client.exception import P115OSError, AuthenticationError, LoginError
26
26
 
27
- from .util import get_status, is_timeouterror
27
+ from .util import get_status_code, is_timeouterror
28
28
 
29
29
 
30
30
  @total_ordering
@@ -374,7 +374,7 @@ def call_wrap_with_pool(get_cert_headers: Callable, /, func: Callable) -> Callab
374
374
  except BaseException as e:
375
375
  if isinstance(e, P115OSError) and e.args[1].get("errno") == 40101004:
376
376
  raise
377
- if not isinstance(e, (AuthenticationError, LoginError)) and get_status(e) != 405:
377
+ if not isinstance(e, (AuthenticationError, LoginError)) and get_status_code(e) != 405:
378
378
  revert()
379
379
  raise
380
380
  return run_gen_step(gen_step, async_=async_)
p115client/tool/util.py CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  __author__ = "ChenyangGao <https://chenyanggao.github.io>"
5
5
  __all__ = [
6
- "get_status", "is_timeouterror", "posix_escape_name", "reduce_image_url_layers",
6
+ "get_status_code", "is_timeouterror", "posix_escape_name", "reduce_image_url_layers",
7
7
  "share_extract_payload", "unescape_115_charref",
8
8
  ]
9
9
  __doc__ = "这个模块提供了一些工具函数"
@@ -23,7 +23,7 @@ class SharePayload(TypedDict):
23
23
  receive_code: None | str
24
24
 
25
25
 
26
- def get_status(e: BaseException, /) -> None | int:
26
+ def get_status_code(e: BaseException, /) -> None | int:
27
27
  """获取 HTTP 请求异常的状态码(如果有的话)
28
28
  """
29
29
  status = (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p115client
3
- Version: 0.0.5.10.1
3
+ Version: 0.0.5.10.3
4
4
  Summary: Python 115 webdisk client.
5
5
  Home-page: https://github.com/ChenyangGao/p115client
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
2
2
  p115client/__init__.py,sha256=1mx7njuAlqcuEWONTjSiiGnXyyNyqOcJyNX1FMHqQ-4,214
3
3
  p115client/_upload.py,sha256=DOckFLU_P7Fl0BNu_0-2od6pPsCnzroYY6zZE5_EMnM,30735
4
- p115client/client.py,sha256=kw18Y5REHdl8XR4idZXL7NjFr39nKVjzMr_jpC61qTs,727452
4
+ p115client/client.py,sha256=98Zf8CzxeSPcU-U7LUd9KMY2WON7F90kGSokbVcqqXU,727434
5
5
  p115client/const.py,sha256=AMyL3QZ172f_RaEkfh27DQxwbkXvPhqfeBWHWTrvSLY,7754
6
6
  p115client/exception.py,sha256=kQMI7lwkFIC_tRuj1HT8zqi5HGzz6fTxgK7B1aKrNTI,3447
7
7
  p115client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -14,13 +14,13 @@ p115client/tool/fs_files.py,sha256=jY57L4nhB9t-2kT_1j3mdiwOdPZKsimN3eN5mUJAqMI,1
14
14
  p115client/tool/history.py,sha256=2S26BH7uBNfVHlbYFNy-aNOLMcM-HrlR7TLHAZacUJI,7458
15
15
  p115client/tool/iterdir.py,sha256=6-ke9yNY3mqHmzEapXk3lYwl3XRkWLH2D_nqJ1nq8Tk,186120
16
16
  p115client/tool/life.py,sha256=X6Bp0GYKwnZeWlttE2DIVw5iOCXM5QzIkM6Zuj24c5Y,17323
17
- p115client/tool/pool.py,sha256=zftRR74IR_5zHigJtaImxGYt81rqCAn_V5Nm7HBMj68,13943
17
+ p115client/tool/pool.py,sha256=K-ALC-JEwik3DYCr5Eckok15oQnHRe6yznKIuJ9jyyM,13953
18
18
  p115client/tool/request.py,sha256=rjXuQwRganE5Z-4rfgnyPFjE4jzdQSLdIs9s0cIDshU,7043
19
19
  p115client/tool/upload.py,sha256=qK1OQYxP-Faq2eMDhc5sBXJiSr8m8EZ_gb0O_iA2TrI,15915
20
- p115client/tool/util.py,sha256=QrB4CIvIBEhl_MGSPSAenkY76WjEUHdcUjpccdc8x_A,3347
20
+ p115client/tool/util.py,sha256=0o9TrXdoPcljgxDDRdxRon41bq1OjuUYCWsR0XLfmPo,3357
21
21
  p115client/tool/xys.py,sha256=WMTisCyN4eYyv4A14yYOpjud2mBhQvBcUHOp6pJUQeA,10140
22
22
  p115client/type.py,sha256=7kOp98uLaYqcTTCgCrb3DRcl8ukMpn7ibsnVvtw2nG8,6250
23
- p115client-0.0.5.10.1.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
24
- p115client-0.0.5.10.1.dist-info/METADATA,sha256=I2AM4pRRwvKwP2s3nM2rozmBbJUAOpyJqsECe9mzmVk,8276
25
- p115client-0.0.5.10.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
26
- p115client-0.0.5.10.1.dist-info/RECORD,,
23
+ p115client-0.0.5.10.3.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
24
+ p115client-0.0.5.10.3.dist-info/METADATA,sha256=mNRDFws1rwnP7Sd8ppO7SMGuxXriEqmqzXh5seMtY_A,8276
25
+ p115client-0.0.5.10.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
26
+ p115client-0.0.5.10.3.dist-info/RECORD,,