python-httpfile 0.0.6__tar.gz → 0.0.6.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.
- {python_httpfile-0.0.6 → python_httpfile-0.0.6.1}/PKG-INFO +2 -2
- {python_httpfile-0.0.6 → python_httpfile-0.0.6.1}/httpfile/__init__.py +7 -7
- {python_httpfile-0.0.6 → python_httpfile-0.0.6.1}/pyproject.toml +2 -2
- {python_httpfile-0.0.6 → python_httpfile-0.0.6.1}/LICENSE +0 -0
- {python_httpfile-0.0.6 → python_httpfile-0.0.6.1}/httpfile/py.typed +0 -0
- {python_httpfile-0.0.6 → python_httpfile-0.0.6.1}/readme.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-httpfile
|
|
3
|
-
Version: 0.0.6
|
|
3
|
+
Version: 0.0.6.1
|
|
4
4
|
Summary: Python httpfile.
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -25,7 +25,7 @@ Requires-Dist: errno2 (>=0.0.5)
|
|
|
25
25
|
Requires-Dist: http_response (>=0.0.9)
|
|
26
26
|
Requires-Dist: python-argtools (>=0.0.3)
|
|
27
27
|
Requires-Dist: python-asynctools (>=0.1.3.4)
|
|
28
|
-
Requires-Dist: python-filewrap (>=0.3.
|
|
28
|
+
Requires-Dist: python-filewrap (>=0.3.1.1)
|
|
29
29
|
Requires-Dist: python-http_request (>=0.1.7.1)
|
|
30
30
|
Requires-Dist: urllib3_future_request (>=0.0.1.4)
|
|
31
31
|
Requires-Dist: yarl
|
|
@@ -26,7 +26,7 @@ from asynctools import ensure_async, run_async
|
|
|
26
26
|
from errno2 import errno
|
|
27
27
|
from filewrap import (
|
|
28
28
|
buffer_length, bytes_iter_to_reader, bytes_iter_to_async_reader,
|
|
29
|
-
AsyncBufferedReader, AsyncTextIOWrapper,
|
|
29
|
+
to_bytes_view, AsyncBufferedReader, AsyncTextIOWrapper,
|
|
30
30
|
)
|
|
31
31
|
from http_request import SupportsGeturl
|
|
32
32
|
from http_response import (
|
|
@@ -266,7 +266,7 @@ class HTTPFileReader[Response](RawIOBase, BinaryIO):
|
|
|
266
266
|
|
|
267
267
|
def _readinto(self, buffer: Buffer, /) -> int:
|
|
268
268
|
read = self.file.read
|
|
269
|
-
m =
|
|
269
|
+
m = to_bytes_view(buffer)
|
|
270
270
|
size = len(m)
|
|
271
271
|
start = 0
|
|
272
272
|
last_intv = size - size % COPY_BUFSIZE
|
|
@@ -920,7 +920,7 @@ class AsyncHTTPFileReader[Response](RawIOBase, BinaryIO):
|
|
|
920
920
|
|
|
921
921
|
async def _readinto(self, buffer: Buffer, /) -> int:
|
|
922
922
|
read = self._get_read()
|
|
923
|
-
m =
|
|
923
|
+
m = to_bytes_view(buffer)
|
|
924
924
|
size = len(m)
|
|
925
925
|
start = 0
|
|
926
926
|
last_intv = size - size % COPY_BUFSIZE
|
|
@@ -1444,7 +1444,7 @@ class MultipartHTTPFileReader[Response](HTTPFileReader[Response]):
|
|
|
1444
1444
|
self.reconnect(pos)
|
|
1445
1445
|
try:
|
|
1446
1446
|
readinto = self.file.readinto
|
|
1447
|
-
view =
|
|
1447
|
+
view = to_bytes_view(buffer)[:remaining]
|
|
1448
1448
|
size = 0
|
|
1449
1449
|
while size < remaining:
|
|
1450
1450
|
start_pos = pos + size
|
|
@@ -1530,7 +1530,7 @@ class MultipartHTTPFileReader[Response](HTTPFileReader[Response]):
|
|
|
1530
1530
|
request_kwargs = dict(self.request_kwargs)
|
|
1531
1531
|
headers = request_kwargs["headers"] = dict(request_kwargs.get("headers") or ())
|
|
1532
1532
|
headers["accept-encoding"] = "identity"
|
|
1533
|
-
view =
|
|
1533
|
+
view = to_bytes_view(buffer)[:remaining]
|
|
1534
1534
|
size = 0
|
|
1535
1535
|
while size < remaining:
|
|
1536
1536
|
for vol in self._parts:
|
|
@@ -1790,7 +1790,7 @@ class AsyncMultipartHTTPFileReader[Response](AsyncHTTPFileReader[Response]):
|
|
|
1790
1790
|
await self.reconnect(pos)
|
|
1791
1791
|
try:
|
|
1792
1792
|
readinto = self.file.readinto
|
|
1793
|
-
view =
|
|
1793
|
+
view = to_bytes_view(buffer)[:remaining]
|
|
1794
1794
|
size = 0
|
|
1795
1795
|
while size < remaining:
|
|
1796
1796
|
start_pos = pos + size
|
|
@@ -1876,7 +1876,7 @@ class AsyncMultipartHTTPFileReader[Response](AsyncHTTPFileReader[Response]):
|
|
|
1876
1876
|
request_kwargs = dict(self.request_kwargs)
|
|
1877
1877
|
headers = request_kwargs["headers"] = dict(request_kwargs.get("headers") or ())
|
|
1878
1878
|
headers["accept-encoding"] = "identity"
|
|
1879
|
-
view =
|
|
1879
|
+
view = to_bytes_view(buffer)[:remaining]
|
|
1880
1880
|
size = 0
|
|
1881
1881
|
while size < remaining:
|
|
1882
1882
|
for vol in self._parts:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "python-httpfile"
|
|
3
|
-
version = "0.0.6"
|
|
3
|
+
version = "0.0.6.1"
|
|
4
4
|
description = "Python httpfile."
|
|
5
5
|
authors = ["ChenyangGao <wosiwujm@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -31,7 +31,7 @@ errno2 = ">=0.0.5"
|
|
|
31
31
|
http_response = ">=0.0.9"
|
|
32
32
|
python-argtools = ">=0.0.3"
|
|
33
33
|
python-asynctools = ">=0.1.3.4"
|
|
34
|
-
python-filewrap = ">=0.3.
|
|
34
|
+
python-filewrap = ">=0.3.1.1"
|
|
35
35
|
python-http_request = ">=0.1.7.1"
|
|
36
36
|
urllib3_future_request = ">=0.0.1.4"
|
|
37
37
|
yarl = "*"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|