Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patchback/backports/3.11/1d170d37f476df705a9dcc3588e192e8ccb871c0/pr 7731 #9005

Closed
wants to merge 99 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
947b9a0
[PR #8755/d50f2759 backport][3.11] Update indirect dependencies with …
patchback[bot] Aug 19, 2024
c1b110b
Bump sphinxcontrib-applehelp from 1.0.2 to 1.0.4 (#8759)
dependabot[bot] Aug 19, 2024
7876997
Bump cfgv from 3.3.1 to 3.4.0 (#8764)
dependabot[bot] Aug 19, 2024
b4b8039
Bump pygments from 2.15.1 to 2.18.0 (#8766)
dependabot[bot] Aug 19, 2024
ff8800f
Bump backports-entry-points-selectable from 1.1.1 to 1.3.0 (#8769)
dependabot[bot] Aug 19, 2024
170c78d
Bump tqdm from 4.62.3 to 4.66.5 (#8771)
dependabot[bot] Aug 19, 2024
0c26269
Bump build from 1.0.3 to 1.2.1 (#8775)
dependabot[bot] Aug 19, 2024
eadc376
Bump pycares from 4.3.0 to 4.4.0 (#8774)
dependabot[bot] Aug 19, 2024
a5b66e3
Bump blockdiag from 2.0.1 to 3.0.0 (#8761)
dependabot[bot] Aug 20, 2024
ac614c5
Bump imagesize from 1.3.0 to 1.4.1 (#8783)
dependabot[bot] Aug 20, 2024
f417d96
Bump urllib3 from 1.26.7 to 2.2.2 (#8786)
dependabot[bot] Aug 20, 2024
9bd2769
Bump snowballstemmer from 2.1.0 to 2.2.0 (#8787)
dependabot[bot] Aug 20, 2024
47b31d6
Bump jinja2 from 3.0.3 to 3.1.4 (#8788)
dependabot[bot] Aug 20, 2024
91cd764
Bump python-dateutil from 2.8.2 to 2.9.0.post0 (#8790)
dependabot[bot] Aug 20, 2024
d76e8be
Bump aiohappyeyeballs from 2.3.7 to 2.4.0 (#8791)
dependabot[bot] Aug 20, 2024
b65d573
Bump certifi from 2023.7.22 to 2024.7.4 (#8793)
dependabot[bot] Aug 20, 2024
7e73d96
Bump zipp from 3.17.0 to 3.20.0 (#8795)
dependabot[bot] Aug 20, 2024
351e07b
Bump virtualenv from 20.10.0 to 20.26.3 (#8794)
dependabot[bot] Aug 20, 2024
5ee29e7
[PR #8776/11171b8d backport][3.11] Use more precise headers type (#8778)
patchback[bot] Aug 20, 2024
ae15bac
Drop Python 3.8 (#8797) (#8799)
Dreamsorcerer Aug 20, 2024
cace1d1
[PR #8800/17bf9127 backport][3.11] Upload junit to codecov (#8802)
patchback[bot] Aug 20, 2024
35b293b
Bump annotated-types from 0.5.0 to 0.7.0 (#8814)
dependabot[bot] Aug 21, 2024
4bab257
Bump incremental from 22.10.0 to 24.7.2 (#8815)
dependabot[bot] Aug 21, 2024
ec5c265
Bump packaging from 21.2 to 24.1 (#8817)
dependabot[bot] Aug 21, 2024
de76808
Bump pip from 23.2.1 to 24.2 (#8816)
dependabot[bot] Aug 21, 2024
d1bc141
Bump identify from 2.3.5 to 2.6.0 (#8818)
dependabot[bot] Aug 21, 2024
b644f7a
Bump importlib-metadata from 6.8.0 to 8.4.0 (#8820)
dependabot[bot] Aug 21, 2024
3a10ee2
Bump iniconfig from 1.1.1 to 2.0.0 (#8821)
dependabot[bot] Aug 21, 2024
37f1f6c
Bump setuptools from 68.0.0 to 73.0.1 (#8819)
dependabot[bot] Aug 21, 2024
8e4b2aa
Bump regex from 2021.11.10 to 2024.7.24 (#8826)
dependabot[bot] Aug 22, 2024
f6e3b71
Bump nodeenv from 1.6.0 to 1.9.1 (#8828)
dependabot[bot] Aug 22, 2024
f087b79
Bump markupsafe from 2.0.1 to 2.1.5 (#8830)
dependabot[bot] Aug 22, 2024
41cb0bf
Bump babel from 2.9.1 to 2.16.0 (#8836)
dependabot[bot] Aug 22, 2024
9af8919
Bump cryptography from 41.0.2 to 43.0.0 (#8837)
dependabot[bot] Aug 22, 2024
57b958e
Bump distlib from 0.3.7 to 0.3.8 (#8838)
dependabot[bot] Aug 22, 2024
f0c89d6
Bump gidgethub from 5.0.1 to 5.3.0 (#8841)
dependabot[bot] Aug 22, 2024
10746c2
Bump typer from 0.6.1 to 0.12.4 (#8840)
dependabot[bot] Aug 22, 2024
7f64912
Bump typing-extensions from 4.11.0 to 4.12.2 (#8839)
dependabot[bot] Aug 22, 2024
8a2a890
Fix Python parser chunked handling with multiple Transfer-Encoding va…
Dreamsorcerer Aug 22, 2024
385e430
[PR #8804/8156789a backport][3.11] docs: minor grammar fix in client_…
patchback[bot] Aug 23, 2024
f1be53e
Bump requests from 2.31.0 to 2.32.3 (#8859)
dependabot[bot] Aug 23, 2024
5319115
Bump sphinxcontrib-htmlhelp from 2.0.0 to 2.0.1 (#8860)
dependabot[bot] Aug 23, 2024
4cdbf01
Bump exceptiongroup from 1.1.2 to 1.2.2 (#8861)
dependabot[bot] Aug 23, 2024
17fa09f
Bump pycparser from 2.21 to 2.22 (#8862)
dependabot[bot] Aug 23, 2024
95e32fb
Bump charset-normalizer from 3.2.0 to 3.3.2 (#8863)
dependabot[bot] Aug 23, 2024
7173b33
Bump pydantic from 2.2.0 to 2.8.2 (#8864)
dependabot[bot] Aug 23, 2024
a74e4f0
Bump filelock from 3.12.2 to 3.15.4 (#8867)
dependabot[bot] Aug 23, 2024
3b3156e
[PR #8846/4dd8c807 backport][3.11] Format status lines with f-strings…
patchback[bot] Aug 23, 2024
b4092d9
No default Content-Type when no content (#8858) (#8871)
Dreamsorcerer Aug 23, 2024
8fd19cb
Bump typer from 0.12.4 to 0.12.5 (#8879)
dependabot[bot] Aug 26, 2024
9b136b9
Bump pytz from 2023.3.post1 to 2024.1 (#8880)
dependabot[bot] Aug 26, 2024
6dd4c10
Bump mypy from 1.11.1 to 1.11.2 (#8881)
dependabot[bot] Aug 26, 2024
cb9fa5c
Bump pyyaml from 6.0.1 to 6.0.2 (#8866)
dependabot[bot] Aug 26, 2024
d73e5c4
Bump platformdirs from 3.10.0 to 4.2.2 (#8883)
dependabot[bot] Aug 26, 2024
996204a
Bump webcolors from 1.11.1 to 24.8.0 (#8865)
dependabot[bot] Aug 26, 2024
400feb6
Return 500 error when handler has wrong return type (#8845) (#8891)
Dreamsorcerer Aug 26, 2024
b2e1294
[PR #5344/bff76313 backport][3.11] Fix StreamResponse.prepared not re…
patchback[bot] Aug 26, 2024
275985c
[PR #8874/d6a677d1 backport][3.11] Update testing utility examples (#…
patchback[bot] Aug 26, 2024
a74e818
Fix server disconnect when error after 100-continue (#8876) (#8899)
Dreamsorcerer Aug 26, 2024
68629b5
Cache the hash generation of the ConnectionKey (#8895)
bdraco Aug 26, 2024
6c7aebb
Ensure error is raised when reading from closed client response. (#88…
Dreamsorcerer Aug 26, 2024
770fdcb
[PR #8847/6d974274 backport][3.11] Improve performance of handling sk…
patchback[bot] Aug 26, 2024
adcdf5c
[PR #8875/0478f143 backport][3.11] Fix unclosed transport warning (#8…
patchback[bot] Aug 26, 2024
cadffc7
Bump wheel from 0.37.0 to 0.44.0 (#8910)
dependabot[bot] Aug 27, 2024
fe85c54
Bump pyproject-hooks from 1.0.0 to 1.1.0 (#8911)
dependabot[bot] Aug 27, 2024
124181f
Bump rich from 13.7.1 to 13.8.0 (#8913)
dependabot[bot] Aug 27, 2024
a0ec949
Bump importlib-resources from 6.1.1 to 6.4.4 (#8915)
dependabot[bot] Aug 27, 2024
94d2cb5
Bump click from 8.0.3 to 8.1.7 (#8917)
dependabot[bot] Aug 27, 2024
36647c6
Bump alabaster from 0.7.12 to 0.7.13 (#8918)
dependabot[bot] Aug 27, 2024
b0a97da
Bump zipp from 3.20.0 to 3.20.1 (#8923)
dependabot[bot] Aug 28, 2024
a69a25a
Bump setuptools from 73.0.1 to 74.0.0 (#8924)
dependabot[bot] Aug 28, 2024
5e498df
Support credentials in URL with empty user (#6494) (#6495) (#8926)
Dreamsorcerer Aug 28, 2024
daa4d5f
[PR #8930/1575360e backport][3.11] Fix limit docs (#8932)
patchback[bot] Aug 29, 2024
37b2604
[PR #8929/c0c3376e backport][3.11] Fix Site.name with empty host (#8935)
patchback[bot] Aug 29, 2024
1dc3cd6
Fix Response.text when body is Payload (#6485) (#8937)
Dreamsorcerer Aug 29, 2024
8173932
[PR #8920/5cf5db56 backport][3.11] Re-enable keep-alive on proxies (#…
patchback[bot] Aug 29, 2024
297ddae
Fix tarfile file-like objects used as data (#6747) (#8940)
Dreamsorcerer Aug 30, 2024
45f8212
Bump certifi from 2024.7.4 to 2024.8.30 (#8943)
dependabot[bot] Aug 30, 2024
aa90362
[PR #8936/76a00d1e backport][3.11] Test coverage of TextIOWrapper (#8…
patchback[bot] Aug 30, 2024
784604e
[PR #8948/cc6d7632 backport][3.11] Make n argument clearer (#8950)
patchback[bot] Aug 30, 2024
e8d6638
[PR #8953/51ea3b39 backport][3.11] Add clarification about auth param…
patchback[bot] Aug 31, 2024
7477503
Add parameters to del_cookie() (#8956) (#8959)
Dreamsorcerer Aug 31, 2024
9ac6853
Fix router matching pre-encoded URLs (#8898) (#8960)
Dreamsorcerer Aug 31, 2024
4614dea
Add aiohttp.tracing.TraceRequestHeadersSentParams into the top level …
Hadock-is-ok Aug 31, 2024
b73a4c1
Deprecate obsolete timeout in ClientSession.ws_connect() (#3946) (#8965)
Dreamsorcerer Sep 1, 2024
9503cf7
[PR #7168/8a525d98 backport][3.11] Fix `test_utils.make_mocked_reques…
patchback[bot] Sep 1, 2024
0fdcc29
Fix CancelledError stopping other cleanup contexts completing (#8908)…
Dreamsorcerer Sep 1, 2024
306e42d
Avoid logging exception from run_app() that is also raised (#8951) (#…
Dreamsorcerer Sep 1, 2024
be27f79
[PR #8966/f569894c backport][3.11] Fix auth reset logic during redire…
patchback[bot] Sep 1, 2024
2af23ab
[PR #8933/8f3b1f44 backport][3.11] Small cleanups to the websocket fr…
patchback[bot] Sep 1, 2024
553e311
[PR #8968/8daecf5c backport][3.11] List specific timeouts for each ex…
patchback[bot] Sep 2, 2024
ea31633
Fix resolve_host "Task was destroyed but it is pending" errors (#8967…
Dreamsorcerer Sep 2, 2024
a86689f
Bump yarl from 1.9.6 to 1.9.7 (#8986)
dependabot[bot] Sep 2, 2024
ed5576d
[PR #8987/5c3d50f9 backport][3.11] Move ContentDisposition in referen…
patchback[bot] Sep 2, 2024
effb575
[PR #8991/1ba30112 backport][3.11] Update ClientSession reference (#8…
patchback[bot] Sep 2, 2024
fa628a2
[PR #8990/731ba4dd backport][3.11] Fix changing scheme/host in Respon…
patchback[bot] Sep 2, 2024
ba201c4
Bump setuptools from 74.0.0 to 74.1.0 (#9001)
dependabot[bot] Sep 3, 2024
a3fa8d8
Fix cancelled payload send leading to hung connection (#8992) (#9002)
Dreamsorcerer Sep 3, 2024
ff878e0
Add flake8-no-implicit-concat (#7731)
booniepepper Aug 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[PR #8991/1ba30112 backport][3.11] Update ClientSession reference (#8995
)

**This is a backport of PR #8991 as merged into master
(1ba3011).**

Co-authored-by: Sam Bull <git@sambull.org>
  • Loading branch information
patchback[bot] and Dreamsorcerer authored Sep 2, 2024
commit effb57523e8cb705bc0d3f1cb1832c02b244f986
1 change: 1 addition & 0 deletions CHANGES/8991.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated ``ClientSession`` parameters to match current code -- by :user:`Dreamsorcerer`.
145 changes: 52 additions & 93 deletions docs/client_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,21 @@ The client session supports the context manager protocol for self closing.
connector=None, cookies=None, \
headers=None, skip_auto_headers=None, \
auth=None, json_serialize=json.dumps, \
request_class=ClientRequest, \
response_class=ClientResponse, \
ws_response_class=ClientWebSocketResponse, \
version=aiohttp.HttpVersion11, \
cookie_jar=None, read_timeout=None, \
conn_timeout=None, \
timeout=sentinel, \
raise_for_status=False, \
cookie_jar=None, \
connector_owner=True, \
raise_for_status=False, \
timeout=sentinel, \
auto_decompress=True, \
read_bufsize=2**16, \
requote_redirect_url=True, \
trust_env=False, \
requote_redirect_url=True, \
trace_configs=None, \
read_bufsize=2**16, \
max_line_size=8190, \
max_field_size=8190, \
fallback_charset_resolver=lambda r, b: "utf-8")

The class for creating client sessions and making requests.
Expand All @@ -67,17 +71,6 @@ The client session supports the context manager protocol for self closing.
:param aiohttp.BaseConnector connector: BaseConnector
sub-class instance to support connection pooling.

:param loop: :ref:`event loop<asyncio-event-loop>` used for
processing HTTP requests.

If *loop* is ``None`` the constructor
borrows it from *connector* if specified.

:func:`asyncio.get_event_loop` is used for getting default event
loop otherwise.

.. deprecated:: 2.0

:param dict cookies: Cookies to send with the request (optional)

:param headers: HTTP Headers to send with every request (optional).
Expand Down Expand Up @@ -106,6 +99,16 @@ The client session supports the context manager protocol for self closing.
otherwise, the default auth will not be
included.

:param collections.abc.Callable json_serialize: Json *serializer* callable.

By default :func:`json.dumps` function.

:param aiohttp.ClientRequest request_class: Custom class to use for client requests.

:param ClientResponse response_class: Custom class to use for client responses.

:param ClientWebSocketResponse ws_response_class: Custom class to use for websocket responses.

:param version: supported HTTP version, ``HTTP 1.1`` by default.

:param cookie_jar: Cookie Jar, :class:`~aiohttp.abc.AbstractCookieJar` instance.
Expand All @@ -121,9 +124,13 @@ The client session supports the context manager protocol for self closing.
:class:`aiohttp.DummyCookieJar` instance can be
provided.

:param collections.abc.Callable json_serialize: Json *serializer* callable.
:param bool connector_owner:

By default :func:`json.dumps` function.
Close connector instance on session closing.

Setting the parameter to ``False`` allows to share
connection pool between sessions without sharing session state:
cookies etc.

:param bool raise_for_status:

Expand Down Expand Up @@ -163,39 +170,10 @@ The client session supports the context manager protocol for self closing.

.. versionadded:: 3.3

:param float read_timeout: Request operations timeout. ``read_timeout`` is
cumulative for all request operations (request, redirects, responses,
data consuming). By default, the read timeout is 5*60 seconds.
Use ``None`` or ``0`` to disable timeout checks.

.. deprecated:: 3.3

Use ``timeout`` parameter instead.

:param float conn_timeout: timeout for connection establishing
(optional). Values ``0`` or ``None`` mean no timeout.

.. deprecated:: 3.3

Use ``timeout`` parameter instead.

:param bool connector_owner:

Close connector instance on session closing.

Setting the parameter to ``False`` allows to share
connection pool between sessions without sharing session state:
cookies etc.

:param bool auto_decompress: Automatically decompress response body (``True`` by default).

.. versionadded:: 2.3

:param int read_bufsize: Size of the read buffer (:attr:`ClientResponse.content`).
64 KiB by default.

.. versionadded:: 3.7

:param bool trust_env: Trust environment settings for proxy configuration if the parameter
is ``True`` (``False`` by default). See :ref:`aiohttp-client-proxy-support` for
more information.
Expand Down Expand Up @@ -232,6 +210,15 @@ The client session supports the context manager protocol for self closing.
disabling. See :ref:`aiohttp-client-tracing-reference` for
more information.

:param int read_bufsize: Size of the read buffer (:attr:`ClientResponse.content`).
64 KiB by default.

.. versionadded:: 3.7

:param int max_line_size: Maximum allowed size of lines in responses.

:param int max_field_size: Maximum allowed size of header fields in responses.

:param Callable[[ClientResponse,bytes],str] fallback_charset_resolver:
A :term:`callable` that accepts a :class:`ClientResponse` and the
:class:`bytes` contents, and returns a :class:`str` which will be used as
Expand Down Expand Up @@ -376,12 +363,15 @@ The client session supports the context manager protocol for self closing.
max_redirects=10,\
compress=None, chunked=None, expect100=False, raise_for_status=None,\
read_until_eof=True, \
read_bufsize=None, \
proxy=None, proxy_auth=None,\
timeout=sentinel, ssl=True, \
verify_ssl=None, fingerprint=None, \
ssl_context=None, proxy_headers=None, \
server_hostname=None, auto_decompress=None)
server_hostname=None, \
proxy_headers=None, \
trace_request_ctx=None, \
read_bufsize=None, \
auto_decompress=None, \
max_line_size=None, \
max_field_size=None)
:async:
:noindexentry:

Expand Down Expand Up @@ -475,12 +465,6 @@ The client session supports the context manager protocol for self closing.
does not have Content-Length header.
``True`` by default (optional).

:param int read_bufsize: Size of the read buffer (:attr:`ClientResponse.content`).
``None`` by default,
it means that the session global value is used.

.. versionadded:: 3.7

:param proxy: Proxy URL, :class:`str` or :class:`~yarl.URL` (optional)

:param aiohttp.BasicAuth proxy_auth: an object that represents proxy HTTP
Expand Down Expand Up @@ -508,48 +492,13 @@ The client session supports the context manager protocol for self closing.

.. versionadded:: 3.0

:param bool verify_ssl: Perform SSL certificate validation for
*HTTPS* requests (enabled by default). May be disabled to
skip validation for sites with invalid certificates.

.. versionadded:: 2.3

.. deprecated:: 3.0

Use ``ssl=False``

:param bytes fingerprint: Pass the SHA256 digest of the expected
certificate in DER format to verify that the certificate the
server presents matches. Useful for `certificate pinning
<https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning>`_.

Warning: use of MD5 or SHA1 digests is insecure and removed.

.. versionadded:: 2.3

.. deprecated:: 3.0

Use ``ssl=aiohttp.Fingerprint(digest)``

:param str server_hostname: Sets or overrides the host name that the
target server’s certificate will be matched against.

See :py:meth:`asyncio.loop.create_connection` for more information.

.. versionadded:: 3.9

:param ssl.SSLContext ssl_context: ssl context used for processing
*HTTPS* requests (optional).

*ssl_context* may be used for configuring certification
authority channel, supported SSL options etc.

.. versionadded:: 2.3

.. deprecated:: 3.0

Use ``ssl=ssl_context``

:param collections.abc.Mapping proxy_headers: HTTP headers to send to the proxy if the
parameter proxy has been provided.

Expand All @@ -562,10 +511,20 @@ The client session supports the context manager protocol for self closing.

.. versionadded:: 3.0

:param int read_bufsize: Size of the read buffer (:attr:`ClientResponse.content`).
``None`` by default,
it means that the session global value is used.

.. versionadded:: 3.7

:param bool auto_decompress: Automatically decompress response body.
Overrides :attr:`ClientSession.auto_decompress`.
May be used to enable/disable auto decompression on a per-request basis.

:param int max_line_size: Maximum allowed size of lines in responses.

:param int max_field_size: Maximum allowed size of header fields in responses.

:return ClientResponse: a :class:`client response <ClientResponse>`
object.

Expand Down
Loading