python-http_request 0.0.5__tar.gz → 0.0.5.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-http_request
3
- Version: 0.0.5
3
+ Version: 0.0.5.1
4
4
  Summary: Python http response utils.
5
5
  Home-page: https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-http_request
6
6
  License: MIT
@@ -110,7 +110,7 @@ def encode_multipart_data(
110
110
  for name, file in files:
111
111
  yield boundary_line
112
112
  yield b'Content-Disposition: form-data; name="%s"\r\nContent-Type: application/octet-stream\r\n\r\n' % bytes(quote(name), "ascii")
113
- if isinstance(file, (bytes, bytearray, memoryview)):
113
+ if isinstance(file, Buffer):
114
114
  yield file
115
115
  elif hasattr(file, "read"):
116
116
  yield from bio_chunk_iter(file)
@@ -146,7 +146,7 @@ def encode_multipart_data_async(
146
146
  for name, file in files:
147
147
  yield boundary_line
148
148
  yield b'Content-Disposition: form-data; name="%s"\r\nContent-Type: application/octet-stream\r\n\r\n' % bytes(quote(name), "ascii")
149
- if isinstance(file, (bytes, bytearray, memoryview)):
149
+ if isinstance(file, Buffer):
150
150
  yield file
151
151
  elif hasattr(file, "read"):
152
152
  async for b in bio_chunk_async_iter(file):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-http_request"
3
- version = "0.0.5"
3
+ version = "0.0.5.1"
4
4
  description = "Python http response utils."
5
5
  authors = ["ChenyangGao <wosiwujm@gmail.com>"]
6
6
  license = "MIT"