python-http_request 0.1.0.1__tar.gz → 0.1.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.1.0.1
3
+ Version: 0.1.1
4
4
  Summary: Python http response utils.
5
5
  Home-page: https://github.com/ChenyangGao/python-modules/tree/main/python-http_request
6
6
  License: MIT
@@ -20,10 +20,10 @@ Classifier: Programming Language :: Python :: 3 :: Only
20
20
  Classifier: Topic :: Software Development
21
21
  Classifier: Topic :: Software Development :: Libraries
22
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
- Requires-Dist: http_response (>=0.0.4)
23
+ Requires-Dist: http_response (>=0.0.7)
24
24
  Requires-Dist: orjson
25
25
  Requires-Dist: python-asynctools (>=0.1.3)
26
- Requires-Dist: python-dicttools (>=0.0.1)
26
+ Requires-Dist: python-dicttools (>=0.0.2)
27
27
  Requires-Dist: python-ensure (>=0.0.1)
28
28
  Requires-Dist: python-filewrap (>=0.2.8)
29
29
  Requires-Dist: python-texttools (>=0.0.4)
@@ -2,7 +2,7 @@
2
2
  # encoding: utf-8
3
3
 
4
4
  __author__ = "ChenyangGao <https://chenyanggao.github.io>"
5
- __version__ = (0, 1, 0)
5
+ __version__ = (0, 1, 1)
6
6
  __all__ = [
7
7
  "SupportsGeturl", "url_origin", "complete_url", "ensure_ascii_url",
8
8
  "urlencode", "cookies_str_to_dict", "headers_str_to_dict_by_lines",
@@ -290,12 +290,10 @@ def encode_multipart_data(
290
290
  def encode_iter() -> Iterator[Buffer]:
291
291
  if data:
292
292
  for name, value in iter_items(data):
293
- yield boundary_line
294
293
  yield from encode_item(name, value)
295
294
  yield b"\r\n"
296
295
  if files:
297
296
  for name, value in iter_items(files):
298
- yield boundary_line
299
297
  yield from encode_item(name, value, is_file=True)
300
298
  yield b"\r\n"
301
299
  yield b'--%s--\r\n' % boundary_bytes
@@ -385,13 +383,11 @@ def encode_multipart_data_async(
385
383
  async def encode_iter() -> AsyncIterator[Buffer]:
386
384
  if data:
387
385
  for name, value in iter_items(data):
388
- yield boundary_line
389
386
  async for line in encode_item(name, value):
390
387
  yield line
391
388
  yield b"\r\n"
392
389
  if files:
393
390
  for name, value in iter_items(files):
394
- yield boundary_line
395
391
  async for line in encode_item(name, value, is_file=True):
396
392
  yield line
397
393
  yield b"\r\n"
@@ -453,7 +449,7 @@ def normalize_request_args(
453
449
  content_type = headers_.get("content-type", "")
454
450
  charset = get_charset(content_type)
455
451
  mimetype = get_mimetype(charset).lower()
456
- if files is not None:
452
+ if files:
457
453
  headers2, data = encode_multipart_data(
458
454
  cast(None | Mapping[string, Any] | Iterable[tuple[string, Any]], data),
459
455
  files,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-http_request"
3
- version = "0.1.0.1"
3
+ version = "0.1.1"
4
4
  description = "Python http response utils."
5
5
  authors = ["ChenyangGao <wosiwujm@gmail.com>"]
6
6
  license = "MIT"
@@ -27,10 +27,10 @@ include = [
27
27
 
28
28
  [tool.poetry.dependencies]
29
29
  python = "^3.12"
30
- http_response = ">=0.0.4"
30
+ http_response = ">=0.0.7"
31
31
  orjson = "*"
32
32
  python-asynctools = ">=0.1.3"
33
- python-dicttools = ">=0.0.1"
33
+ python-dicttools = ">=0.0.2"
34
34
  python-ensure = ">=0.0.1"
35
35
  python-filewrap = ">=0.2.8"
36
36
  python-texttools = ">=0.0.4"