@@ -119,9 +119,10 @@ def __init__(
119
119
self ._connections : List [AsyncConnectionInterface ] = []
120
120
self ._requests : List [AsyncPoolRequest ] = []
121
121
122
- # We only mutate the state of the connection pool within an 'optional_thread_lock'
123
- # context. This holds a threading lock unless we're running in async mode,
124
- # in which case it is a no-op.
122
+ # We only mutate the state of the connection pool
123
+ # within an 'optional_thread_lock' context.
124
+ # This holds a threading lock unless we're running in
125
+ # async mode, in which case it is a no-op.
125
126
self ._optional_thread_lock = AsyncThreadLock ()
126
127
127
128
def create_connection (self , origin : Origin ) -> AsyncConnectionInterface :
@@ -148,9 +149,12 @@ def connections(self) -> List[AsyncConnectionInterface]:
148
149
```python
149
150
>>> pool.connections
150
151
[
151
- <AsyncHTTPConnection ['https://example.com:443', HTTP/1.1, ACTIVE, Request Count: 6]>,
152
- <AsyncHTTPConnection ['https://example.com:443', HTTP/1.1, IDLE, Request Count: 9]> ,
153
- <AsyncHTTPConnection ['http://example.com:80', HTTP/1.1, IDLE, Request Count: 1]>,
152
+ <AsyncHTTPConnection ['https://example.com:443', HTTP/1.1, ACTIVE,
153
+ Request Count: 6]>,
154
+ <AsyncHTTPConnection ['https://example.com:443', HTTP/1.1, IDLE,
155
+ Request Count: 9]>,
156
+ <AsyncHTTPConnection ['http://example.com:80', HTTP/1.1, IDLE,
157
+ Request Count: 1]>,
154
158
]
155
159
```
156
160
"""
@@ -160,7 +164,7 @@ async def handle_async_request(self, request: Request) -> Response:
160
164
"""
161
165
Send an HTTP request, and return an HTTP response.
162
166
163
- This is the core implementation that is called into by `.request()` or `.stream()`.
167
+ The core implementation that is called into by `.request()` or `.stream()`.
164
168
"""
165
169
scheme = request .url .scheme .decode ()
166
170
if scheme == "" :
0 commit comments