Source code

Revision control

Copy as Markdown

Other Tools

..
You should *NOT* be adding new change log entries to this file, this
file is managed by towncrier. You *may* edit previous change logs to
fix problems like typo corrections or such.
To add a new change log entry, please see
we named the news folder "changes".
WARNING: Don't drop the next directive!
.. towncrier release notes start
3.8.5 (2023-07-19)
==================
Security bugfixes
-----------------
- Upgraded the vendored copy of llhttp_ to v8.1.1 -- by :user:`webknjaz`
and :user:`Dreamsorcerer`.
Thanks to :user:`sethmlarson` for reporting this and providing us with
comprehensive reproducer, workarounds and fixing details! For more
information, see
.. _llhttp: https://llhttp.org
Features
--------
- Added information to C parser exceptions to show which character caused the error. -- by :user:`Dreamsorcerer`
Bugfixes
--------
- Fixed a transport is :data:`None` error -- by :user:`Dreamsorcerer`.
----
3.8.4 (2023-02-12)
==================
Bugfixes
--------
- Fixed incorrectly overwriting cookies with the same name and domain, but different path.
- Fixed ``ConnectionResetError`` not being raised after client disconnection in SSL environments.
----
3.8.3 (2022-09-21)
==================
.. attention::
This is the last :doc:`aiohttp <index>` release tested under
Python 3.6. The 3.9 stream is dropping it from the CI and the
distribution package metadata.
Bugfixes
--------
- Increased the upper boundary of the :doc:`multidict:index` dependency
to allow for the version 6 -- by :user:`hugovk`.
It used to be limited below version 7 in :doc:`aiohttp <index>` v3.8.1 but
was lowered in v3.8.2 via :pr:`6550` and never brought back, causing
problems with dependency pins when upgrading. :doc:`aiohttp <index>` v3.8.3
fixes that by recovering the original boundary of ``< 7``.
----
3.8.2 (2022-09-20, subsequently yanked on 2022-09-21)
=====================================================
.. note::
This release has some compatibility fixes for Python 3.11 but it may
still have some quirks. Some tests are still flaky in the CI.
.. caution::
This release has been yanked from PyPI. Modern pip will not pick it
up automatically. The reason is that is has ``multidict < 6`` set in
the distribution package metadata (see :pr:`6950`). Please, use
``aiohttp ~= 3.8.3, != 3.8.1`` instead, if you can.
Bugfixes
--------
- Added support for registering :rfc:`OPTIONS <9110#OPTIONS>`
HTTP method handlers via :py:class:`~aiohttp.web.RouteTableDef`.
- Started supporting :rfc:`authority-form <9112#authority-form>` and
:rfc:`absolute-form <9112#absolute-form>` URLs on the server-side.
- Fixed Python 3.11 incompatibilities by using Cython 0.29.25.
- Extended the ``sock`` argument typing declaration of the
:py:func:`~aiohttp.web.run_app` function as optionally
accepting iterables.
- Fixed a regression where :py:exc:`~asyncio.CancelledError`
occurs on client disconnection.
- Started exporting :py:class:`~aiohttp.web.PrefixedSubAppResource`
under :py:mod:`aiohttp.web` -- by :user:`Dreamsorcerer`.
This fixes a regression introduced by :pr:`3469`.
- Dropped the :class:`object` type possibility from
the :py:attr:`aiohttp.ClientSession.timeout`
property return type declaration.
Improved Documentation
----------------------
- Added clarification on configuring the app object with
settings such as a database connection.
- Extended the ``sock`` argument typing declaration of the
:py:func:`~aiohttp.web.run_app` function as optionally
accepting iterables.
- Dropped the :class:`object` type possibility from
the :py:attr:`aiohttp.ClientSession.timeout`
property return type declaration.
Deprecations and Removals
-------------------------
- Dropped Python 3.5 support, :doc:`aiohttp <index>` only works
under Python 3.6 and higher from now on.
Misc
----
- Removed a deprecated usage of :py:func:`pytest.warns(None)
<pytest.warns>` in tests.
----
3.8.1 (2021-11-14)
==================
Bugfixes
--------
- 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.
- Do not install "examples" as a top-level package.
- Restored ability to connect IPv6-only host.
- Remove ``Signal`` from ``__all__``, replace ``aiohttp.Signal`` with ``aiosignal.Signal`` in docs
- Made chunked encoding HTTP header check stricter.
Improved Documentation
----------------------
- update quick starter demo codes.
- Added an explanation of how tiny timeouts affect performance to the client reference document.
- Add flake8-docstrings to flake8 configuration, enable subset of checks.
- Added information on running complex applications with additional tasks/processes -- :user:`Dreamsorcerer`.
Misc
----
----
3.8.0 (2021-10-31)
==================
Features
--------
- Added a ``GunicornWebWorker`` feature for extending the aiohttp server configuration by allowing the 'wsgi' coroutine to return ``web.AppRunner`` object.
- Switch from ``http-parser`` to ``llhttp``
- Use Brotli instead of brotlipy
- 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.
- Make access log use local time with timezone
- Implemented ``readuntil`` in ``StreamResponse``
- FileResponse now supports ETag.
- Add a request handler type alias ``aiohttp.typedefs.Handler``.
- ``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``.
- Add validation of HTTP header keys and values to prevent header injection.
- Add predicate to ``AbstractCookieJar.clear``.
Add ``AbstractCookieJar.clear_domain`` to clean all domain and subdomains cookies only.
- Add keepalive_timeout parameter to web.run_app.
- Tracing for client sent headers
- Make type hints for http parser stricter
- Add final declarations for constants.
- Switch to external frozenlist and aiosignal libraries.
- 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.
- 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.
- Add ``aiohttp.pytest_plugin.AiohttpClient`` for static typing of pytest plugin.
- Added a ``socket_factory`` argument to ``BaseTestServer``.
- Add compression strategy parameter to enable_compression method.
- Added support for Python 3.10 to Github Actions CI/CD workflows and fix the related deprecation warnings -- :user:`Hanaasagi`.
- Switched ``chardet`` to ``charset-normalizer`` for guessing the HTTP payload body encoding -- :user:`Ousret`.
- Added optional auto_decompress argument for HttpRequestParser
- Added support for HTTPS proxies to the extent CPython's
:py:mod:`asyncio` supports it -- by :user:`bmbouter`,
:user:`jborean93` and :user:`webknjaz`.
- Added ``base_url`` parameter to the initializer of :class:`~aiohttp.ClientSession`.
- Add Trove classifier and create binary wheels for 3.10. -- :user:`hugovk`.
- Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes — :user:`asvetlov`.
- Started shipping platform-specific arm64 wheels for Apple Silicon — :user:`asvetlov`.
Bugfixes
--------
- Modify _drain_helper() to handle concurrent `await resp.write(...)` or `ws.send_json(...)` calls without race-condition.
- Started using `MultiLoopChildWatcher` when it's available under POSIX while setting up the test I/O loop.
- Only encode content-disposition filename parameter using percent-encoding.
Other parameters are encoded to quoted-string or RFC2231 extended parameter
value.
- Fixed HTTP client requests to honor ``no_proxy`` environment variables.
- Fix supporting WebSockets proxies configured via environment variables.
- Change return type on URLDispatcher to UrlMappingMatchInfo to improve type annotations.
- Ensure a cleanup context is cleaned up even when an exception occurs during startup.
- Added a new exception type for Unix socket client errors which provides a more useful error message.
- Remove Transfer-Encoding and Content-Type headers for 204 in StreamResponse
- Only depend on typing_extensions for Python <3.8
- Add ABNORMAL_CLOSURE and BAD_GATEWAY to WSCloseCode
- Fix cookies disappearing from HTTPExceptions.
- 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``.
- Acquire the connection before running traces to prevent race condition.
- Add missing slots to ```_RequestContextManager`` and ``_WSRequestContextManager``
- Ensure sending a zero byte file does not throw an exception (round 2)
- Set "text/plain" when data is an empty string in client requests.
- Stop automatically releasing the ``ClientResponse`` object on calls to the ``ok`` property for the failed requests.
- Include query parameters from `params` keyword argument in tracing `URL`.
- Fix annotations
- 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`.
- Fix 0 being incorrectly treated as an immediate timeout.
- Fixes failing tests when an environment variable <scheme>_proxy is set.
- 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``.
- Fixed test for ``HTTPUnauthorized`` that access the ``text`` argument. This is not used in any part of the code, so it's removed now.
- Remove incorrect default from docs
- Remove external test dependency to http://httpbin.org
- Don't cancel current task when entering a cancelled timer.
- Added ``params`` keyword argument to ``ClientSession.ws_connect``. -- :user:`hoh`.
- Uses :py:class:`~asyncio.ThreadedChildWatcher` under POSIX to allow setting up test loop in non-main thread.
- 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.
- Removed the deprecated ``loop`` argument from the ``asyncio.sleep``/``gather`` calls
- 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.
- Fix resetting `SIGCHLD` signals in Gunicorn aiohttp Worker to fix `subprocesses` that capture output having an incorrect `returncode`.
- 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
Improved Documentation
----------------------
- Refactored OpenAPI/Swagger aiohttp addons, added ``aio-openapi``
- Fixed docs on request cookies type, so it matches what is actually used in the code (a
read-only dictionary-like object).
- Documented that the HTTP client ``Authorization`` header is removed
on redirects to a different host or protocol.
Misc
----
----
3.7.4.post0 (2021-03-06)
========================
Misc
----
- Bumped upper bound of the ``chardet`` runtime dependency
to allow their v4.0 version stream.
----
3.7.4 (2021-02-25)
==================
Bugfixes
--------
- **(SECURITY BUG)** Started preventing open redirects in the
``aiohttp.web.normalize_path_middleware`` middleware. For
more details, see
Thanks to `Beast Glatisant <https://github.com/g147>`__ for
finding the first instance of this issue and `Jelmer Vernooij
<https://jelmer.uk/>`__ for reporting and tracking it down
in aiohttp.
- Fix interpretation difference of the pure-Python and the Cython-based
HTTP parsers construct a ``yarl.URL`` object for HTTP request-target.
Before this fix, the Python parser would turn the URI's absolute-path
for ``//some-path`` into ``/`` while the Cython code preserved it as
``//some-path``. Now, both do the latter.
----
3.7.3 (2020-11-18)
==================
Features
--------
- Use Brotli instead of brotlipy
- Made exceptions pickleable. Also changed the repr of some exceptions.
Bugfixes
--------
- Raise a ClientResponseError instead of an AssertionError for a blank
HTTP Reason Phrase.
- Fix ``web_middlewares.normalize_path_middleware`` behavior for patch without slash.
- Fix overshadowing of overlapped sub-applications prefixes.
- Make `BaseConnector.close()` a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax.
- Reset the ``sock_read`` timeout each time data is received for a ``aiohttp.client`` response.
- Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View
- Fixed querying the address families from DNS that the current host supports.
- Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator.
- Provide x86 Windows wheels.
Improved Documentation
----------------------
- Add documentation for ``aiohttp.web.FileResponse``.
- Removed deprecation warning in tracing example docs
- Fixed wrong "Usage" docstring of ``aiohttp.client.request``.
- Add aiohttp-pydantic to third party libraries
Misc
----
----
3.7.2 (2020-10-27)
==================
Bugfixes
--------
- Fixed static files handling for loops without ``.sendfile()`` support
----
3.7.1 (2020-10-25)
==================
Bugfixes
--------
- Fixed a type error caused by the conditional import of `Protocol`.
- Server doesn't send Content-Length for 1xx or 204
- Fix run_app typing
- Always require ``typing_extensions`` library.
- Fix a variable-shadowing bug causing `ThreadedResolver.resolve` to
return the resolved IP as the ``hostname`` in each record, which prevented
validation of HTTPS connections.
- Added annotations to all public attributes.
- Fix flaky test_when_timeout_smaller_second
- Ensure sending a zero byte file does not throw an exception
- Fix a bug in ``web.run_app()`` about Python version checking on Windows
----
3.7.0 (2020-10-24)
==================
Features
--------
- Response headers are now prepared prior to running ``on_response_prepare`` hooks, directly before headers are sent to the client.
- Add a ``quote_cookie`` option to ``CookieJar``, a way to skip quotation wrapping of cookies containing special characters.
- Call ``AccessLogger.log`` with the current exception available from ``sys.exc_info()``.
- `web.UrlDispatcher.add_routes` and `web.Application.add_routes` return a list
of registered `AbstractRoute` instances. `AbstractRouteDef.register` (and all
subclasses) return a list of registered resources registered resource.
- Added properties of default ClientSession params to ClientSession class so it is available for introspection
- Don't cancel web handler on peer disconnection, raise `OSError` on reading/writing instead.
- Implement BaseRequest.get_extra_info() to access a protocol transports' extra info.
- Added `ClientSession.timeout` property.
- allow use of SameSite in cookies.
- Use ``loop.sendfile()`` instead of custom implementation if available.
- Apply SO_REUSEADDR to test server's socket.
- Use .raw_host instead of slower .host in client API
- Allow configuring the buffer size of input stream by passing ``read_bufsize`` argument.
- Pass tests on Python 3.8 for Windows.
- Add `method` and `url` attributes to `TraceRequestChunkSentParams` and `TraceResponseChunkReceivedParams`.
- Add ClientResponse.ok property for checking status code under 400.
- Don't ceil timeouts that are smaller than 5 seconds.
- TCPSite now listens by default on all interfaces instead of just IPv4 when `None` is passed in as the host.
- Bump ``http_parser`` to 2.9.4
Bugfixes
--------
- Fix keepalive connections not being closed in time
- Fix failed websocket handshake leaving connection hanging.
- Fix tasks cancellation order on exit. The run_app task needs to be cancelled first for cleanup hooks to run with all tasks intact.
- Don't start heartbeat until _writer is set
- Fix handling of multipart file uploads without a content type.
- Preserve view handler function attributes across middlewares
- Fix the string representation of ``ServerDisconnectedError``.
- Raising RuntimeError when trying to get encoding from not read body
- Remove warning messages from noop.
- Raise ClientPayloadError if FormData re-processed.
- Fix a warning about unfinished task in ``web_protocol.py``
- Fixed 'deflate' compression. According to RFC 2616 now.
- Fixed OverflowError on platforms with 32-bit time_t
- Fixed request.body_exists returns wrong value for methods without body.
- Fix connecting to link-local IPv6 addresses.
- Fix a problem with connection waiters that are never awaited.
- Always make sure transport is not closing before reuse a connection.
Reuse a protocol based on keepalive in headers is unreliable.
For example, uWSGI will not support keepalive even it serves a
HTTP 1.1 request, except explicitly configure uWSGI with a
``--http-keepalive`` option.
Servers designed like uWSGI could cause aiohttp intermittently
raise a ConnectionResetException when the protocol poll runs
out and some protocol is reused.
- Handle the last CRLF correctly even if it is received via separate TCP segment.
- Fix the register_resource function to validate route name before splitting it so that route name can include python keywords.
- Improve typing annotations for ``web.Request``, ``aiohttp.ClientResponse`` and
``multipart`` module.
- Fix resolver task is not awaited when connector is cancelled
- Fix a bug "Aiohttp doesn't return any error on invalid request methods"
- Fix HEAD requests for static content.
- Fix incorrect size calculation for memoryview
- Add HTTPMove to _all__.
- Fixed the type annotations in the ``tracing`` module.
- Fix typing for multipart ``__aiter__``.
- Fix for race condition on connections in BaseConnector that leads to exceeding the connection limit.
- Add forced UTF-8 encoding for ``application/rdap+json`` responses.
- Fix inconsistency between Python and C http request parsers in parsing pct-encoded URL.
- Fix connection closing issue in HEAD request.
- Fix type hint on BaseRunner.addresses (from ``List[str]`` to ``List[Any]``)
- Make `web.run_app()` more responsive to Ctrl+C on Windows for Python < 3.8. It slightly
increases CPU load as a side effect.
Improved Documentation
----------------------
- Fix example code in client quick-start
- Updated the docs so there is no contradiction in ``ttl_dns_cache`` default value
- Add 'Deploy with SSL' to docs.
- Change typing of the secure argument on StreamResponse.set_cookie from ``Optional[str]`` to ``Optional[bool]``
- Changes ``ttl_dns_cache`` type from int to Optional[int].
- Simplify README hello word example and add a documentation page for people coming from requests.
- Improve some code examples in the documentation involving websockets and starting a simple HTTP site with an AppRunner.
- Fix typo in code example in Multipart docs
- Fix code example in Multipart section.
- Update contributing guide so new contributors read the most recent version of that guide. Update command used to create test coverage reporting.
- Spelling: Change "canonize" to "canonicalize".
- Add ``aiohttp-sse-client`` library to third party usage list.
Misc
----
----
3.6.3 (2020-10-12)
==================
Bugfixes
--------
- Pin yarl to ``<1.6.0`` to avoid buggy behavior that will be fixed by the next aiohttp
release.
3.6.2 (2019-10-09)
==================
Features
--------
- Made exceptions pickleable. Also changed the repr of some exceptions.
- Use ``Iterable`` type hint instead of ``Sequence`` for ``Application`` *middleware*
Bugfixes
--------
- Reset the ``sock_read`` timeout each time data is received for a
``aiohttp.ClientResponse``. `#3808
- Fix handling of expired cookies so they are not stored in CookieJar.
- Fix misleading message in the string representation of ``ClientConnectorError``;
``self.ssl == None`` means default SSL context, not SSL disabled `#4097
- Don't clobber HTTP status when using FileResponse.
Improved Documentation
----------------------
- Added minimal required logging configuration to logging documentation.
- Update docs to reflect proxy support.
- Fix typo in code example in testing docs.
Misc
----
----
3.6.1 (2019-09-19)
==================
Features
--------
- Compatibility with Python 3.8.
Bugfixes
--------
- correct some exception string format
- Emit a warning when ``ssl.OP_NO_COMPRESSION`` is
unavailable because the runtime is built against
an outdated OpenSSL.
- Update multidict requirement to >= 4.5
Improved Documentation
----------------------
- Provide pytest-aiohttp namespace for pytest fixtures in docs.
----
3.6.0 (2019-09-06)
==================
Features
--------
- Add support for Named Pipes (Site and Connector) under Windows. This feature requires
Proactor event loop to work. `#3629
- Removed ``Transfer-Encoding: chunked`` header from websocket responses to be
compatible with more http proxy servers. `#3798
- Accept non-GET request for starting websocket handshake on server side.
Bugfixes
--------
- Raise a ClientResponseError instead of an AssertionError for a blank
HTTP Reason Phrase.
- Fix an issue where cookies would sometimes not be set during a redirect.
- Change normalize_path_middleware to use 308 redirect instead of 301.
This behavior should prevent clients from being unable to use PUT/POST
methods on endpoints that are redirected because of a trailing slash.
- Drop the processed task from ``all_tasks()`` list early. It prevents logging about a
task with unhandled exception when the server is used in conjunction with
``asyncio.run()``. `#3587 <https://github.com/aio-libs/aiohttp/issues/3587>`_
- ``Signal`` type annotation changed from ``Signal[Callable[['TraceConfig'],
Awaitable[None]]]`` to ``Signal[Callable[ClientSession, SimpleNamespace, ...]``.
- Use sanitized URL as Location header in redirects
- Improve typing annotations for multipart.py along with changes required
by mypy in files that references multipart.py.
- Close session created inside ``aiohttp.request`` when unhandled exception occurs
- Cleanup per-chunk data in generic data read. Memory leak fixed.
- Use correct type for add_view and family
- Fix _keepalive field in __slots__ of ``RequestHandler``.
- Properly handle ConnectionResetError, to silence the "Cannot write to closing
transport" exception when clients disconnect uncleanly.
- Suppress pytest warnings due to ``test_utils`` classes
- Fix overshadowing of overlapped sub-application prefixes.
- Fixed return type annotation for WSMessage.json()
- Properly expose TooManyRedirects publicly as documented.
- Fix missing brackets for IPv6 in proxy CONNECT request
- Make the signature of ``aiohttp.test_utils.TestClient.request`` match
``asyncio.ClientSession.request`` according to the docs `#3852
- Use correct style for re-exported imports, makes mypy ``--strict`` mode happy.
- Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of
- Made cython HTTP parser set Reason-Phrase of the response to an empty string if it is
- Add URL to the string representation of ClientResponseError.
- Accept ``istr`` keys in ``LooseHeaders`` type hints.
- Fixed race conditions in _resolve_host caching and throttling when tracing is enabled.
- For URLs like "unix://localhost/..." set Host HTTP header to "localhost" instead of
Improved Documentation
----------------------
- Modify documentation for Background Tasks to remove deprecated usage of event loop.
- use ``if __name__ == '__main__':`` in server examples.
- Update documentation reference to the default access logger.
- Improve documentation for ``web.BaseRequest.path`` and ``web.BaseRequest.raw_path``.
- Removed deprecation warning in tracing example docs
----
3.5.4 (2019-01-12)
==================
Bugfixes
--------
- Fix stream ``.read()`` / ``.readany()`` / ``.iter_any()`` which used to return a
partial content only in case of compressed content
3.5.3 (2019-01-10)
==================
Bugfixes
--------
- Fix type stubs for ``aiohttp.web.run_app(access_log=True)`` and fix edge case of
``access_log=True`` and the event loop being in debug mode. `#3504
- Fix ``aiohttp.ClientTimeout`` type annotations to accept ``None`` for fields
- Send custom per-request cookies even if session jar is empty
- Restore Linux binary wheels publishing on PyPI
----
3.5.2 (2019-01-08)
==================
Features
--------
- ``FileResponse`` from ``web_fileresponse.py`` uses a ``ThreadPoolExecutor`` to work
with files asynchronously. I/O based payloads from ``payload.py`` uses a
``ThreadPoolExecutor`` to work with I/O objects asynchronously. `#3313
- Internal Server Errors in plain text if the browser does not support HTML.
Bugfixes
--------
- Preserve MultipartWriter parts headers on write. Refactor the way how
``Payload.headers`` are handled. Payload instances now always have headers and
Content-Type defined. Fix Payload Content-Disposition header reset after initial
- Log suppressed exceptions in ``GunicornWebWorker``.
- Remove wildcard imports.
- Use the same task for app initialization and web server handling in gunicorn workers.
It allows to use Python3.7 context vars smoothly.
- Fix handling of chunked+gzipped response when first chunk does not give uncompressed
- Replace ``collections.MutableMapping`` with ``collections.abc.MutableMapping`` to
avoid a deprecation warning. `#3480
- ``Payload.size`` type annotation changed from ``Optional[float]`` to
``Optional[int]``. `#3484 <https://github.com/aio-libs/aiohttp/issues/3484>`_
- Ignore done tasks when cancels pending activities on ``web.run_app`` finalization.
Improved Documentation
----------------------
- Add documentation for ``aiohttp.web.HTTPException``.
Misc
----
----
3.5.1 (2018-12-24)
====================
- Fix a regression about ``ClientSession._requote_redirect_url`` modification in debug
mode.
3.5.0 (2018-12-22)
====================
Features
--------
- The library type annotations are checked in strict mode now.
- Add support for setting cookies for individual request (`#2387
- Application.add_domain implementation (`#2809
- The default ``app`` in the request returned by ``test_utils.make_mocked_request`` can
now have objects assigned to it and retrieved using the ``[]`` operator. (`#3174
- Make ``request.url`` accessible when transport is closed. (`#3177
- Add ``zlib_executor_size`` argument to ``Response`` constructor to allow compression
to run in a background executor to avoid blocking the main thread and potentially
triggering health check failures. (`#3205
- Enable users to set ``ClientTimeout`` in ``aiohttp.request`` (`#3213
- Don't raise a warning if ``NETRC`` environment variable is not set and ``~/.netrc``
file doesn't exist. (`#3267 <https://github.com/aio-libs/aiohttp/pull/3267>`_)
- Add default logging handler to web.run_app If the ``Application.debug``` flag is set
and the default logger ``aiohttp.access`` is used, access logs will now be output
using a *stderr* ``StreamHandler`` if no handlers are attached. Furthermore, if the
default logger has no log level set, the log level will be set to ``DEBUG``. (`#3324
- Add method argument to ``session.ws_connect()``. Sometimes server API requires a
different HTTP method for WebSocket connection establishment. For example, ``Docker
exec`` needs POST. (`#3378 <https://github.com/aio-libs/aiohttp/pull/3378>`_)
- Create a task per request handling. (`#3406
Bugfixes
--------
- Enable passing ``access_log_class`` via ``handler_args`` (`#3158
- Return empty bytes with end-of-chunk marker in empty stream reader. (`#3186
- Accept ``CIMultiDictProxy`` instances for ``headers`` argument in ``web.Response``
- Don't uppercase HTTP method in parser (`#3233
- Make method match regexp RFC-7230 compliant (`#3235
- Add ``app.pre_frozen`` state to properly handle startup signals in
sub-applications. (`#3237 <https://github.com/aio-libs/aiohttp/pull/3237>`_)
- Enhanced parsing and validation of helpers.BasicAuth.decode. (`#3239
- Change imports from collections module in preparation for 3.8. (`#3258
- Ensure Host header is added first to ClientRequest to better replicate browser (`#3265
- Fix forward compatibility with Python 3.8: importing ABCs directly from the
collections module will not be supported anymore. (`#3273
- Keep the query string by ``normalize_path_middleware``. (`#3278
- Fix missing parameter ``raise_for_status`` for aiohttp.request() (`#3290
- Bracket IPv6 addresses in the HOST header (`#3304
- Fix default message for server ping and pong frames. (`#3308
- Fix tests/test_connector.py typo and tests/autobahn/server.py duplicate loop
- Fix false-negative indicator end_of_HTTP_chunk in StreamReader.readchunk function
- Release HTTP response before raising status exception (`#3364
- Fix task cancellation when ``sendfile()`` syscall is used by static file
- Fix stack trace for ``asyncio.TimeoutError`` which was not logged, when it is caught
in the handler. (`#3414 <https://github.com/aio-libs/aiohttp/pull/3414>`_)
Improved Documentation
----------------------
- Improve documentation of ``Application.make_handler`` parameters. (`#3152
- Fix BaseRequest.raw_headers doc. (`#3215
- Fix typo in TypeError exception reason in ``web.Application._handle`` (`#3229
- Make server access log format placeholder %b documentation reflect
behavior and docstring. (`#3307 <https://github.com/aio-libs/aiohttp/pull/3307>`_)
Deprecations and Removals
-------------------------
- Deprecate modification of ``session.requote_redirect_url`` (`#2278
- Deprecate ``stream.unread_data()`` (`#3260
- Deprecated use of boolean in ``resp.enable_compression()`` (`#3318
- Encourage creation of aiohttp public objects inside a coroutine (`#3331
- Drop dead ``Connection.detach()`` and ``Connection.writer``. Both methods were broken
for more than 2 years. (`#3358 <https://github.com/aio-libs/aiohttp/pull/3358>`_)
- Deprecate ``app.loop``, ``request.loop``, ``client.loop`` and ``connector.loop``
- Deprecate explicit debug argument. Use asyncio debug mode instead. (`#3381
- Deprecate body parameter in HTTPException (and derived classes) constructor. (`#3385
- Deprecate bare connector close, use ``async with connector:`` and ``await
connector.close()`` instead. (`#3417
- Deprecate obsolete ``read_timeout`` and ``conn_timeout`` in ``ClientSession``
Misc
----
- #3341, #3351