Merge branch 'master' into async-dependencies-optional
This commit is contained in:
commit
aa9ca07104
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v4"
|
||||
- uses: "actions/setup-python@v4"
|
||||
- uses: "actions/setup-python@v5"
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: "Install dependencies"
|
||||
|
||||
2
.github/workflows/test-suite.yml
vendored
2
.github/workflows/test-suite.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v4"
|
||||
- uses: "actions/setup-python@v4"
|
||||
- uses: "actions/setup-python@v5"
|
||||
with:
|
||||
python-version: "${{ matrix.python-version }}"
|
||||
allow-prereleases: true
|
||||
|
||||
@ -598,6 +598,8 @@ class Client(BaseClient):
|
||||
to authenticate the client. Either a path to an SSL certificate file, or
|
||||
two-tuple of (certificate file, key file), or a three-tuple of (certificate
|
||||
file, key file, password).
|
||||
* **http2** - *(optional)* A boolean indicating if HTTP/2 support should be
|
||||
enabled. Defaults to `False`.
|
||||
* **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
|
||||
* **proxies** - *(optional)* A dictionary mapping proxy keys to proxy
|
||||
URLs.
|
||||
@ -1311,6 +1313,8 @@ class AsyncClient(BaseClient):
|
||||
An asynchronous HTTP client, with connection pooling, HTTP/2, redirects,
|
||||
cookie persistence, etc.
|
||||
|
||||
It can be shared between tasks.
|
||||
|
||||
Usage:
|
||||
|
||||
```python
|
||||
@ -1544,6 +1548,15 @@ class AsyncClient(BaseClient):
|
||||
|
||||
[0]: /advanced/#merging-of-configuration
|
||||
"""
|
||||
|
||||
if cookies is not None: # pragma: no cover
|
||||
message = (
|
||||
"Setting per-request cookies=<...> is being deprecated, because "
|
||||
"the expected behaviour on cookie persistence is ambiguous. Set "
|
||||
"cookies directly on the client instance instead."
|
||||
)
|
||||
warnings.warn(message, DeprecationWarning)
|
||||
|
||||
request = self.build_request(
|
||||
method=method,
|
||||
url=url,
|
||||
@ -1656,7 +1669,7 @@ class AsyncClient(BaseClient):
|
||||
|
||||
return response
|
||||
|
||||
except BaseException as exc: # pragma: no cover
|
||||
except BaseException as exc:
|
||||
await response.aclose()
|
||||
raise exc
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ class SSLConfig:
|
||||
ssl_context.load_cert_chain(
|
||||
certfile=self.cert[0],
|
||||
keyfile=self.cert[1],
|
||||
password=self.cert[2], # type: ignore
|
||||
password=self.cert[2],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -104,9 +104,9 @@ class FileField:
|
||||
if len(value) == 2:
|
||||
# neither the 3rd parameter (content_type) nor the 4th (headers)
|
||||
# was included
|
||||
filename, fileobj = value # type: ignore
|
||||
filename, fileobj = value
|
||||
elif len(value) == 3:
|
||||
filename, fileobj, content_type = value # type: ignore
|
||||
filename, fileobj, content_type = value
|
||||
else:
|
||||
# all 4 parameters included
|
||||
filename, fileobj, content_type, headers = value # type: ignore
|
||||
|
||||
@ -11,18 +11,18 @@ chardet==5.2.0
|
||||
# Documentation
|
||||
mkdocs==1.5.3
|
||||
mkautodoc==0.2.0
|
||||
mkdocs-material==9.4.14
|
||||
mkdocs-material==9.5.3
|
||||
|
||||
# Packaging
|
||||
build==1.0.3
|
||||
twine==4.0.2
|
||||
|
||||
# Tests & Linting
|
||||
coverage[toml]==7.3.0
|
||||
coverage[toml]==7.4.0
|
||||
cryptography==41.0.7
|
||||
mypy==1.5.1
|
||||
pytest==7.4.3
|
||||
ruff==0.1.6
|
||||
mypy==1.8.0
|
||||
pytest==7.4.4
|
||||
ruff==0.1.9
|
||||
trio==0.22.2
|
||||
trustme==1.1.0
|
||||
uvicorn==0.24.0.post1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user