Skip to content

Commit 5479076

Browse files
Version 0.10.1 (#141)
1 parent d8e7c83 commit 5479076

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44

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

7+
## 0.10.1 (August 7th, 2020)
8+
9+
- Include `max_keepalive_connections` on `AsyncHTTPProxy`/`SyncHTTPProxy` classes.
10+
711
## 0.10.0 (August 7th, 2020)
812

913
The most notable change in the 0.10.0 release is that HTTP/2 support is now fully optional.

httpcore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@
4949
"IteratorByteStream",
5050
"PlainByteStream",
5151
]
52-
__version__ = "0.10.0"
52+
__version__ = "0.10.1"

httpcore/_async/http_proxy.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class AsyncHTTPProxy(AsyncConnectionPool):
4444
verifying connections.
4545
* **max_connections** - `Optional[int]` - The maximum number of concurrent
4646
connections to allow.
47-
* **max_keepalive** - `Optional[int]` - The maximum number of connections
48-
to allow before closing keep-alive connections.
47+
* **max_keepalive_connections** - `Optional[int]` - The maximum number of
48+
connections to allow before closing keep-alive connections.
4949
* **http2** - `bool` - Enable HTTP/2 support.
5050
"""
5151

@@ -56,9 +56,11 @@ def __init__(
5656
proxy_mode: str = "DEFAULT",
5757
ssl_context: SSLContext = None,
5858
max_connections: int = None,
59-
max_keepalive: int = None,
59+
max_keepalive_connections: int = None,
6060
keepalive_expiry: float = None,
6161
http2: bool = False,
62+
# Deprecated argument style:
63+
max_keepalive: int = None,
6264
):
6365
assert proxy_mode in ("DEFAULT", "FORWARD_ONLY", "TUNNEL_ONLY")
6466

@@ -68,9 +70,10 @@ def __init__(
6870
super().__init__(
6971
ssl_context=ssl_context,
7072
max_connections=max_connections,
71-
max_keepalive=max_keepalive,
73+
max_keepalive_connections=max_keepalive_connections,
7274
keepalive_expiry=keepalive_expiry,
7375
http2=http2,
76+
max_keepalive=max_keepalive,
7477
)
7578

7679
async def request(

httpcore/_sync/http_proxy.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class SyncHTTPProxy(SyncConnectionPool):
4444
verifying connections.
4545
* **max_connections** - `Optional[int]` - The maximum number of concurrent
4646
connections to allow.
47-
* **max_keepalive** - `Optional[int]` - The maximum number of connections
48-
to allow before closing keep-alive connections.
47+
* **max_keepalive_connections** - `Optional[int]` - The maximum number of
48+
connections to allow before closing keep-alive connections.
4949
* **http2** - `bool` - Enable HTTP/2 support.
5050
"""
5151

@@ -56,9 +56,11 @@ def __init__(
5656
proxy_mode: str = "DEFAULT",
5757
ssl_context: SSLContext = None,
5858
max_connections: int = None,
59-
max_keepalive: int = None,
59+
max_keepalive_connections: int = None,
6060
keepalive_expiry: float = None,
6161
http2: bool = False,
62+
# Deprecated argument style:
63+
max_keepalive: int = None,
6264
):
6365
assert proxy_mode in ("DEFAULT", "FORWARD_ONLY", "TUNNEL_ONLY")
6466

@@ -68,9 +70,10 @@ def __init__(
6870
super().__init__(
6971
ssl_context=ssl_context,
7072
max_connections=max_connections,
71-
max_keepalive=max_keepalive,
73+
max_keepalive_connections=max_keepalive_connections,
7274
keepalive_expiry=keepalive_expiry,
7375
http2=http2,
76+
max_keepalive=max_keepalive,
7477
)
7578

7679
def request(

0 commit comments

Comments
 (0)