Skip to content

Update dependency aiohttp to v3.8.0 - autoclosed

igswsihw-wmadepbot requested to merge renovate/aiohttp-3.x into main

This MR contains the following updates:

Package Change Age Adoption Passing Confidence
aiohttp ==3.7.4.post0 -> ==3.8.0 age adoption passing confidence

Release Notes

aio-libs/aiohttp

v3.8.0

Compare Source

==================

Features

  • Added a GunicornWebWorker feature for extending the aiohttp server configuration by allowing the 'wsgi' coroutine to return web.AppRunner object. #&#8203;2988 <https://github.com/aio-libs/aiohttp/issues/2988>_

  • Switch from http-parser to llhttp #&#8203;3561 <https://github.com/aio-libs/aiohttp/issues/3561>_

  • Use Brotli instead of brotlipy #&#8203;3803 <https://github.com/aio-libs/aiohttp/issues/3803>_

  • Disable implicit switch-back to pure python mode. The build fails loudly if aiohttp cannot be compiled with C Accelerators. Use AIOHTTP_NO_EXTENSIONS=1 to explicitly disable C Extensions complication and switch to Pure-Python mode. Note that Pure-Python mode is significantly slower than compiled one. #&#8203;3828 <https://github.com/aio-libs/aiohttp/issues/3828>_

  • Make access log use local time with timezone #&#8203;3853 <https://github.com/aio-libs/aiohttp/issues/3853>_

  • Implemented readuntil in StreamResponse #&#8203;4054 <https://github.com/aio-libs/aiohttp/issues/4054>_

  • FileResponse now supports ETag. #&#8203;4594 <https://github.com/aio-libs/aiohttp/issues/4594>_

  • Add a request handler type alias aiohttp.typedefs.Handler. #&#8203;4686 <https://github.com/aio-libs/aiohttp/issues/4686>_

  • AioHTTPTestCase is more async friendly now.

    For people who use unittest and are used to use :py:exc:~unittest.TestCase it will be easier to write new test cases like the sync version of the :py:exc:~unittest.TestCase class, without using the decorator @unittest_run_loop, just async def test_*. The only difference is that for the people using python3.7 and below a new dependency is needed, it is asynctestcase. #&#8203;4700 <https://github.com/aio-libs/aiohttp/issues/4700>_

  • Add validation of HTTP header keys and values to prevent header injection. #&#8203;4818 <https://github.com/aio-libs/aiohttp/issues/4818>_

  • Add predicate to AbstractCookieJar.clear. Add AbstractCookieJar.clear_domain to clean all domain and subdomains cookies only. #&#8203;4942 <https://github.com/aio-libs/aiohttp/issues/4942>_

  • Add keepalive_timeout parameter to web.run_app. #&#8203;5094 <https://github.com/aio-libs/aiohttp/issues/5094>_

  • Tracing for client sent headers #&#8203;5105 <https://github.com/aio-libs/aiohttp/issues/5105>_

  • Make type hints for http parser stricter #&#8203;5267 <https://github.com/aio-libs/aiohttp/issues/5267>_

  • Add final declarations for constants. #&#8203;5275 <https://github.com/aio-libs/aiohttp/issues/5275>_

  • Switch to external frozenlist and aiosignal libraries. #&#8203;5293 <https://github.com/aio-libs/aiohttp/issues/5293>_

  • Don't send secure cookies by insecure transports.

    By default, the transport is secure if https or wss scheme is used. Use CookieJar(treat_as_secure_origin="http://127.0.0.1") to override the default security checker. #&#8203;5571 <https://github.com/aio-libs/aiohttp/issues/5571>_

  • Always create a new event loop in aiohttp.web.run_app(). This adds better compatibility with asyncio.run() or if trying to run multiple apps in sequence. #&#8203;5572 <https://github.com/aio-libs/aiohttp/issues/5572>_

  • Add aiohttp.pytest_plugin.AiohttpClient for static typing of pytest plugin. #&#8203;5585 <https://github.com/aio-libs/aiohttp/issues/5585>_

  • Added a socket_factory argument to BaseTestServer. #&#8203;5844 <https://github.com/aio-libs/aiohttp/issues/5844>_

  • Add compression strategy parameter to enable_compression method. #&#8203;5909 <https://github.com/aio-libs/aiohttp/issues/5909>_

  • Added support for Python 3.10 to Github Actions CI/CD workflows and fix the related deprecation warnings -- :user:Hanaasagi. #&#8203;5927 <https://github.com/aio-libs/aiohttp/issues/5927>_

  • Switched chardet to charset-normalizer for guessing the HTTP payload body encoding -- :user:Ousret. #&#8203;5930 <https://github.com/aio-libs/aiohttp/issues/5930>_

  • Added optional auto_decompress argument for HttpRequestParser #&#8203;5957 <https://github.com/aio-libs/aiohttp/issues/5957>_

  • Added support for HTTPS proxies to the extent CPython's :py:mod:asyncio supports it -- by :user:bmbouter, :user:jborean93 and :user:webknjaz. #&#8203;5992 <https://github.com/aio-libs/aiohttp/issues/5992>_

  • Added base_url parameter to the initializer of :class:~aiohttp.ClientSession. #&#8203;6013 <https://github.com/aio-libs/aiohttp/issues/6013>_

  • Add Trove classifier and create binary wheels for 3.10. -- :user:hugovk. #&#8203;6079 <https://github.com/aio-libs/aiohttp/issues/6079>_

  • Started shipping platform-specific wheels with the musl tag targeting typical Alpine Linux runtimes — :user:asvetlov. #&#8203;6139 <https://github.com/aio-libs/aiohttp/issues/6139>_

  • Started shipping platform-specific arm64 wheels for Apple Silicon — :user:asvetlov. #&#8203;6139 <https://github.com/aio-libs/aiohttp/issues/6139>_

Bugfixes

  • Modify drain_helper() to handle concurrent await resp.write(...) or ws.send_json(...) calls without race-condition. #&#8203;2934 <https://github.com/aio-libs/aiohttp/issues/2934>
  • Started using MultiLoopChildWatcher when it's available under POSIX while setting up the test I/O loop. #&#8203;3450 <https://github.com/aio-libs/aiohttp/issues/3450>_
  • Only encode content-disposition filename parameter using percent-encoding. Other parameters are encoded to quoted-string or RFC2231 extended parameter value. #&#8203;4012 <https://github.com/aio-libs/aiohttp/issues/4012>_
  • Fixed HTTP client requests to honor no_proxy environment variables. #&#8203;4431 <https://github.com/aio-libs/aiohttp/issues/4431>_
  • Fix supporting WebSockets proxies configured via environment variables. #&#8203;4648 <https://github.com/aio-libs/aiohttp/issues/4648>_
  • Change return type on URLDispatcher to UrlMappingMatchInfo to improve type annotations. #&#8203;4748 <https://github.com/aio-libs/aiohttp/issues/4748>_
  • Ensure a cleanup context is cleaned up even when an exception occurs during startup. #&#8203;4799 <https://github.com/aio-libs/aiohttp/issues/4799>_
  • Added a new exception type for Unix socket client errors which provides a more useful error message. #&#8203;4984 <https://github.com/aio-libs/aiohttp/issues/4984>_
  • Remove Transfer-Encoding and Content-Type headers for 204 in StreamResponse #&#8203;5106 <https://github.com/aio-libs/aiohttp/issues/5106>_
  • Only depend on typing_extensions for Python <3.8 #&#8203;5107 <https://github.com/aio-libs/aiohttp/issues/5107>_
  • Add ABNORMAL_CLOSURE and BAD_GATEWAY to WSCloseCode #&#8203;5192 <https://github.com/aio-libs/aiohttp/issues/5192>_
  • Fix cookies disappearing from HTTPExceptions. #&#8203;5233 <https://github.com/aio-libs/aiohttp/issues/5233>_
  • StaticResource prefixes no longer match URLs with a non-folder prefix. For example routes.static('/foo', '/foo') no longer matches the URL /foobar. Previously, this would attempt to load the file /foo/ar. #&#8203;5250 <https://github.com/aio-libs/aiohttp/issues/5250>_
  • Acquire the connection before running traces to prevent race condition. #&#8203;5259 <https://github.com/aio-libs/aiohttp/issues/5259>_
  • Add missing slots to ```_RequestContextManagerandWSRequestContextManager`` #&#8203;5329 <https://github.com/aio-libs/aiohttp/issues/5329>
  • Ensure sending a zero byte file does not throw an exception (round 2) #&#8203;5380 <https://github.com/aio-libs/aiohttp/issues/5380>_
  • Set "text/plain" when data is an empty string in client requests. #&#8203;5392 <https://github.com/aio-libs/aiohttp/issues/5392>_
  • Stop automatically releasing the ClientResponse object on calls to the ok property for the failed requests. #&#8203;5403 <https://github.com/aio-libs/aiohttp/issues/5403>_
  • Include query parameters from params keyword argument in tracing URL. #&#8203;5432 <https://github.com/aio-libs/aiohttp/issues/5432>_
  • Fix annotations #&#8203;5466 <https://github.com/aio-libs/aiohttp/issues/5466>_
  • Fixed the multipart POST requests processing to always release file descriptors for the tempfile.Temporaryfile-created _io.BufferedRandom instances of files sent within multipart request bodies via HTTP POST requests -- by :user:webknjaz. #&#8203;5494 <https://github.com/aio-libs/aiohttp/issues/5494>_
  • Fix 0 being incorrectly treated as an immediate timeout. #&#8203;5527 <https://github.com/aio-libs/aiohttp/issues/5527>_
  • Fixes failing tests when an environment variable proxy is set. #&#8203;5554 <https://github.com/aio-libs/aiohttp/issues/5554>
  • Replace deprecated app handler design in tests/autobahn/server.py with call to web.run_app; replace deprecated aiohttp.ws_connect calls in tests/autobahn/client.py with aiohttp.ClienSession.ws_connect. #&#8203;5606 <https://github.com/aio-libs/aiohttp/issues/5606>_
  • Fixed test for HTTPUnauthorized that access the text argument. This is not used in any part of the code, so it's removed now. #&#8203;5657 <https://github.com/aio-libs/aiohttp/issues/5657>_
  • Remove incorrect default from docs #&#8203;5727 <https://github.com/aio-libs/aiohttp/issues/5727>_
  • Remove external test dependency to http://httpbin.org #&#8203;5840 <https://github.com/aio-libs/aiohttp/issues/5840>_
  • Don't cancel current task when entering a cancelled timer. #&#8203;5853 <https://github.com/aio-libs/aiohttp/issues/5853>_
  • Added params keyword argument to ClientSession.ws_connect. -- :user:hoh. #&#8203;5868 <https://github.com/aio-libs/aiohttp/issues/5868>_
  • Uses :py:class:~asyncio.ThreadedChildWatcher under POSIX to allow setting up test loop in non-main thread. #&#8203;5877 <https://github.com/aio-libs/aiohttp/issues/5877>_
  • Fix the error in handling the return value of getaddrinfo. getaddrinfo will return an (int, bytes) tuple, if CPython could not handle the address family. It will cause a index out of range error in aiohttp. For example, if user compile CPython with --disable-ipv6 option but his system enable the ipv6. #&#8203;5901 <https://github.com/aio-libs/aiohttp/issues/5901>_
  • Removed the deprecated loop argument from the asyncio.sleep/gather calls #&#8203;5905 <https://github.com/aio-libs/aiohttp/issues/5905>_
  • Return None from request.if_modified_since, request.if_unmodified_since, request.if_range and response.last_modified when corresponding http date headers are invalid. #&#8203;5925 <https://github.com/aio-libs/aiohttp/issues/5925>_
  • Fix resetting SIGCHLD signals in Gunicorn aiohttp Worker to fix subprocesses that capture output having an incorrect returncode. #&#8203;6130 <https://github.com/aio-libs/aiohttp/issues/6130>_
  • Raise 400: Content-Length can't be present with Transfer-Encoding if both Content-Length and Transfer-Encoding are sent by peer by both C and Python implementations #&#8203;6182 <https://github.com/aio-libs/aiohttp/issues/6182>_

Improved Documentation

  • Refactored OpenAPI/Swagger aiohttp addons, added aio-openapi #&#8203;5326 <https://github.com/aio-libs/aiohttp/issues/5326>_
  • Fixed docs on request cookies type, so it matches what is actually used in the code (a read-only dictionary-like object). #&#8203;5725 <https://github.com/aio-libs/aiohttp/issues/5725>_
  • Documented that the HTTP client Authorization header is removed on redirects to a different host or protocol. #&#8203;5850 <https://github.com/aio-libs/aiohttp/issues/5850>_

Misc

  • #&#8203;3927 <https://github.com/aio-libs/aiohttp/issues/3927>*, #&#8203;4247 <https://github.com/aio-libs/aiohttp/issues/4247>*, #&#8203;4247 <https://github.com/aio-libs/aiohttp/issues/4247>*, #&#8203;5389 <https://github.com/aio-libs/aiohttp/issues/5389>*, #&#8203;5457 <https://github.com/aio-libs/aiohttp/issues/5457>*, #&#8203;5486 <https://github.com/aio-libs/aiohttp/issues/5486>*, #&#8203;5494 <https://github.com/aio-libs/aiohttp/issues/5494>*, #&#8203;5515 <https://github.com/aio-libs/aiohttp/issues/5515>*, #&#8203;5625 <https://github.com/aio-libs/aiohttp/issues/5625>*, #&#8203;5635 <https://github.com/aio-libs/aiohttp/issues/5635>*, #&#8203;5648 <https://github.com/aio-libs/aiohttp/issues/5648>*, #&#8203;5657 <https://github.com/aio-libs/aiohttp/issues/5657>*, #&#8203;5890 <https://github.com/aio-libs/aiohttp/issues/5890>*, #&#8203;5914 <https://github.com/aio-libs/aiohttp/issues/5914>*, #&#8203;5932 <https://github.com/aio-libs/aiohttp/issues/5932>*, #&#8203;6002 <https://github.com/aio-libs/aiohttp/issues/6002>*, #&#8203;6045 <https://github.com/aio-libs/aiohttp/issues/6045>*, #&#8203;6131 <https://github.com/aio-libs/aiohttp/issues/6131>*, #&#8203;6156 <https://github.com/aio-libs/aiohttp/issues/6156>*, #&#8203;6165 <https://github.com/aio-libs/aiohttp/issues/6165>*, #&#8203;6166 <https://github.com/aio-libs/aiohttp/issues/6166>_


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, click this checkbox.

This MR has been generated by Renovate Bot.

Edited by igswsihw-wmadepbot

Merge request reports