Skip to content

Commit e62cc48

Browse files
committed
Intermediate changes
commit_hash:f156ba65c000119307fc0419041ef428237788b4
1 parent cd219f0 commit e62cc48

File tree

8 files changed

+22
-15
lines changed

8 files changed

+22
-15
lines changed

contrib/python/httpcore/.dist-info/METADATA

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.3
22
Name: httpcore
3-
Version: 1.0.5
3+
Version: 1.0.6
44
Summary: A minimal low-level HTTP client.
55
Project-URL: Documentation, https://www.encode.io/httpcore
66
Project-URL: Homepage, https://www.encode.io/httpcore/
@@ -33,7 +33,7 @@ Requires-Dist: h2<5,>=3; extra == 'http2'
3333
Provides-Extra: socks
3434
Requires-Dist: socksio==1.*; extra == 'socks'
3535
Provides-Extra: trio
36-
Requires-Dist: trio<0.26.0,>=0.22.0; extra == 'trio'
36+
Requires-Dist: trio<1.0,>=0.22.0; extra == 'trio'
3737
Description-Content-Type: text/markdown
3838

3939
# HTTP Core
@@ -79,7 +79,7 @@ There are also a number of optional extras available...
7979
$ pip install httpcore['asyncio,trio,http2,socks']
8080
```
8181

82-
# Sending requests
82+
## Sending requests
8383

8484
Send an HTTP request:
8585

@@ -153,6 +153,12 @@ All notable changes to this project will be documented in this file.
153153

154154
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
155155

156+
## Version 1.0.6 (October 1st, 2024)
157+
158+
- Relax `trio` dependency pinning. (#956)
159+
- Handle `trio` raising `NotImplementedError` on unsupported platforms. (#955)
160+
- Handle mapping `ssl.SSLError` to `httpcore.ConnectError`. (#918)
161+
156162
## 1.0.5 (March 27th, 2024)
157163

158164
- Handle `EndOfStream` exception for anyio backend. (#899)

contrib/python/httpcore/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ There are also a number of optional extras available...
4141
$ pip install httpcore['asyncio,trio,http2,socks']
4242
```
4343

44-
# Sending requests
44+
## Sending requests
4545

4646
Send an HTTP request:
4747

contrib/python/httpcore/httpcore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __init__(self, *args, **kwargs): # type: ignore
130130
"WriteError",
131131
]
132132

133-
__version__ = "1.0.5"
133+
__version__ = "1.0.6"
134134

135135

136136
__locals = locals()

contrib/python/httpcore/httpcore/_async/connection_pool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def _assign_requests_to_connections(self) -> List[AsyncConnectionInterface]:
262262
queued_requests = [request for request in self._requests if request.is_queued()]
263263
for pool_request in queued_requests:
264264
origin = pool_request.request.url.origin
265-
avilable_connections = [
265+
available_connections = [
266266
connection
267267
for connection in self._connections
268268
if connection.can_handle_request(origin) and connection.is_available()
@@ -277,9 +277,9 @@ def _assign_requests_to_connections(self) -> List[AsyncConnectionInterface]:
277277
# 2. We can create a new connection to handle the request.
278278
# 3. We can close an idle connection and then create a new connection
279279
# to handle the request.
280-
if avilable_connections:
280+
if available_connections:
281281
# log: "reusing existing connection"
282-
connection = avilable_connections[0]
282+
connection = available_connections[0]
283283
pool_request.assign_to_connection(connection)
284284
elif len(self._connections) < self._max_connections:
285285
# log: "creating new connection"

contrib/python/httpcore/httpcore/_backends/anyio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ async def start_tls(
6464
TimeoutError: ConnectTimeout,
6565
anyio.BrokenResourceError: ConnectError,
6666
anyio.EndOfStream: ConnectError,
67+
ssl.SSLError: ConnectError,
6768
}
6869
with map_exceptions(exc_map):
6970
try:
@@ -103,9 +104,9 @@ async def connect_tcp(
103104
timeout: typing.Optional[float] = None,
104105
local_address: typing.Optional[str] = None,
105106
socket_options: typing.Optional[typing.Iterable[SOCKET_OPTION]] = None,
106-
) -> AsyncNetworkStream:
107+
) -> AsyncNetworkStream: # pragma: nocover
107108
if socket_options is None:
108-
socket_options = [] # pragma: no cover
109+
socket_options = []
109110
exc_map = {
110111
TimeoutError: ConnectTimeout,
111112
OSError: ConnectError,

contrib/python/httpcore/httpcore/_sync/connection_pool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def _assign_requests_to_connections(self) -> List[ConnectionInterface]:
262262
queued_requests = [request for request in self._requests if request.is_queued()]
263263
for pool_request in queued_requests:
264264
origin = pool_request.request.url.origin
265-
avilable_connections = [
265+
available_connections = [
266266
connection
267267
for connection in self._connections
268268
if connection.can_handle_request(origin) and connection.is_available()
@@ -277,9 +277,9 @@ def _assign_requests_to_connections(self) -> List[ConnectionInterface]:
277277
# 2. We can create a new connection to handle the request.
278278
# 3. We can close an idle connection and then create a new connection
279279
# to handle the request.
280-
if avilable_connections:
280+
if available_connections:
281281
# log: "reusing existing connection"
282-
connection = avilable_connections[0]
282+
connection = available_connections[0]
283283
pool_request.assign_to_connection(connection)
284284
elif len(self._connections) < self._max_connections:
285285
# log: "creating new connection"

contrib/python/httpcore/httpcore/_synchronization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
try:
1111
import trio
12-
except ImportError: # pragma: nocover
12+
except (ImportError, NotImplementedError): # pragma: nocover
1313
trio = None # type: ignore
1414

1515
try:

contrib/python/httpcore/ya.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
PY3_LIBRARY()
44

5-
VERSION(1.0.5)
5+
VERSION(1.0.6)
66

77
LICENSE(BSD-3-Clause)
88

0 commit comments

Comments
 (0)