robot-piglet 11 месяцев назад
Родитель
Сommit
30aa997daf

+ 8 - 3
contrib/python/httpcore/.dist-info/METADATA

@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.3
 Name: httpcore
-Version: 1.0.4
+Version: 1.0.5
 Summary: A minimal low-level HTTP client.
 Project-URL: Documentation, https://www.encode.io/httpcore
 Project-URL: Homepage, https://www.encode.io/httpcore/
@@ -33,7 +33,7 @@ Requires-Dist: h2<5,>=3; extra == 'http2'
 Provides-Extra: socks
 Requires-Dist: socksio==1.*; extra == 'socks'
 Provides-Extra: trio
-Requires-Dist: trio<0.25.0,>=0.22.0; extra == 'trio'
+Requires-Dist: trio<0.26.0,>=0.22.0; extra == 'trio'
 Description-Content-Type: text/markdown
 
 # HTTP Core
@@ -153,6 +153,11 @@ All notable changes to this project will be documented in this file.
 
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
+## 1.0.5 (March 27th, 2024)
+
+- Handle `EndOfStream` exception for anyio backend. (#899)
+- Allow trio `0.25.*` series in package dependancies. (#903)
+
 ## 1.0.4 (February 21st, 2024)
 
 - Add `target` request extension. (#888)

+ 1 - 1
contrib/python/httpcore/httpcore/__init__.py

@@ -130,7 +130,7 @@ __all__ = [
     "WriteError",
 ]
 
-__version__ = "1.0.4"
+__version__ = "1.0.5"
 
 
 __locals = locals()

+ 3 - 3
contrib/python/httpcore/httpcore/_async/http2.py

@@ -75,9 +75,9 @@ class AsyncHTTP2Connection(AsyncConnectionInterface):
 
         # Connection terminated events are stored as state since
         # we need to handle them for all streams.
-        self._connection_terminated: typing.Optional[
-            h2.events.ConnectionTerminated
-        ] = None
+        self._connection_terminated: typing.Optional[h2.events.ConnectionTerminated] = (
+            None
+        )
 
         self._read_exception: typing.Optional[Exception] = None
         self._write_exception: typing.Optional[Exception] = None

+ 2 - 0
contrib/python/httpcore/httpcore/_backends/anyio.py

@@ -27,6 +27,7 @@ class AnyIOStream(AsyncNetworkStream):
             TimeoutError: ReadTimeout,
             anyio.BrokenResourceError: ReadError,
             anyio.ClosedResourceError: ReadError,
+            anyio.EndOfStream: ReadError,
         }
         with map_exceptions(exc_map):
             with anyio.fail_after(timeout):
@@ -62,6 +63,7 @@ class AnyIOStream(AsyncNetworkStream):
         exc_map = {
             TimeoutError: ConnectTimeout,
             anyio.BrokenResourceError: ConnectError,
+            anyio.EndOfStream: ConnectError,
         }
         with map_exceptions(exc_map):
             try:

+ 1 - 1
contrib/python/httpcore/httpcore/_models.py

@@ -339,7 +339,7 @@ class Request:
             url: The request URL, either as a `URL` instance, or as a string or bytes.
                 For example: `"https://www.example.com".`
             headers: The HTTP request headers.
-            content: The content of the response body.
+            content: The content of the request body.
             extensions: A dictionary of optional extra information included on
                 the request. Possible keys include `"timeout"`, and `"trace"`.
         """

+ 3 - 3
contrib/python/httpcore/httpcore/_sync/http2.py

@@ -75,9 +75,9 @@ class HTTP2Connection(ConnectionInterface):
 
         # Connection terminated events are stored as state since
         # we need to handle them for all streams.
-        self._connection_terminated: typing.Optional[
-            h2.events.ConnectionTerminated
-        ] = None
+        self._connection_terminated: typing.Optional[h2.events.ConnectionTerminated] = (
+            None
+        )
 
         self._read_exception: typing.Optional[Exception] = None
         self._write_exception: typing.Optional[Exception] = None

+ 1 - 1
contrib/python/httpcore/ya.make

@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(1.0.4)
+VERSION(1.0.5)
 
 LICENSE(BSD-3-Clause)