Skip to content

Releases: aio-libs/aiohttp

aiohttp 3.3.1

05 Jun 21:00
Compare
Choose a tag to compare

Bugfix release.

Changes

  • Fix sock_read timeout. (#3053)
  • When using a server-request body as the data= argument of a client request,
    iterate over the content with readany instead of readline to avoid Line too long errors. (#3054)

aiohttp 3.3.0 release

01 Jun 13:08
Compare
Choose a tag to compare

The main change is introducing new client timeouts.

The release has many new improvements and bugfixes as well.

Changes

Features

  • Raise ConnectionResetError instead of CancelledError on trying to
    write to a closed stream. #2499
  • Implement ClientTimeout class and support socket read timeout. #2768
  • Enable logging when aiohttp.web is used as a program #2956
  • Add canonical property to resources #2968
  • Forbid reading response BODY after release #2983
  • Implement base protocol class to avoid a dependency from internal
    asyncio.streams.FlowControlMixin #2986
  • Cythonize @helpers.reify, 5% boost on macro benchmark #2995
  • Optimize HTTP parser #3015
  • Implement runner.addresses property. #3036
  • Use bytearray instead of a list of bytes in websocket reader. It
    improves websocket message reading a little. #3039
  • Remove heartbeat on closing connection on keepalive timeout. The used hack
    violates HTTP protocol. #3041
  • Limit websocket message size on reading to 4 MB by default. #3045

Bugfixes

  • Don't reuse a connection with the same URL but different proxy/TLS settings
    #2981
  • When parsing the Forwarded header, the optional port number is now preserved.
    #3009

Improved Documentation

  • Make Change Log more visible in docs #3029
  • Make style and grammar improvements on the FAQ page. #3030- Document that signal handlers should be async functions since aiohttp 3.0
    #3032

Deprecations and Removals

  • Deprecate custom application's router. #3021

aiohttp 3.2.1 release

10 May 08:52
Compare
Choose a tag to compare

Changes

  • Don't reuse a connection with the same URL but different proxy/TLS settings
    (#2981)

aiohttp 3.2.0 release

07 May 07:07
Compare
Choose a tag to compare

Changes

Features

  • Raise TooManyRedirects exception when client gets redirected too many
    times instead of returning last response. (#2631 <https://github.com/aio-libs/aiohttp/pull/2631>_)
  • Extract route definitions into separate web_routedef.py file (#2876 <https://github.com/aio-libs/aiohttp/pull/2876>_)
  • Raise an exception on request body reading after sending response. (#2895 <https://github.com/aio-libs/aiohttp/pull/2895>_)
  • ClientResponse and RequestInfo now have real_url property, which is request
    url without fragment part being stripped (#2925 <https://github.com/aio-libs/aiohttp/pull/2925>_)
  • Speed up connector limiting (#2937 <https://github.com/aio-libs/aiohttp/pull/2937>_)
  • Added and links property for ClientResponse object (#2948 <https://github.com/aio-libs/aiohttp/pull/2948>_)
  • Add request.config_dict for exposing nested applications data. (#2949 <https://github.com/aio-libs/aiohttp/pull/2949>_)
  • Speed up HTTP headers serialization, server micro-benchmark runs 5% faster
    now. (#2957 <https://github.com/aio-libs/aiohttp/pull/2957>_)
  • Apply assertions in debug mode only (#2966 <https://github.com/aio-libs/aiohttp/pull/2966>_)

Bugfixes

  • expose property app for TestClient (#2891 <https://github.com/aio-libs/aiohttp/pull/2891>_)
  • Call on_chunk_sent when write_eof takes as a param the last chunk (#2909 <https://github.com/aio-libs/aiohttp/pull/2909>_)
  • A closing bracket was added to repr of resources (#2935 <https://github.com/aio-libs/aiohttp/pull/2935>_)
  • Fix compression of FileResponse (#2942 <https://github.com/aio-libs/aiohttp/pull/2942>_)
  • Fixes some bugs in the limit connection feature (#2964 <https://github.com/aio-libs/aiohttp/pull/2964>_)

Improved Documentation

  • Drop async_timeout usage from documentation for client API in favor of
    timeout parameter. (#2865 <https://github.com/aio-libs/aiohttp/pull/2865>_)
  • Improve Gunicorn logging documentation (#2921 <https://github.com/aio-libs/aiohttp/pull/2921>_)
  • Replace multipart writer .serialize() method with .write() in
    documentation. (#2965 <https://github.com/aio-libs/aiohttp/pull/2965>_)

Deprecations and Removals

  • Deprecate Application.make_handler() (#2938 <https://github.com/aio-libs/aiohttp/pull/2938>_)

Misc

aiohttp 3.1.3 release

13 Apr 11:03
Compare
Choose a tag to compare

Bugfix release

Changes

  • Fix cancellation broadcast during DNS resolve (#2910 <https://github.com/aio-libs/aiohttp/pull/2910>_)

aiohttp 3.1.2 release

06 Apr 06:19
Compare
Choose a tag to compare

Bugfix release, no new features against 3.1.0

Changes

  • Make LineTooLong exception more detailed about actual data size (#2863)
  • Call on_chunk_sent when write_eof() takes as a param the last chunk (#2909)

aiohttp 3.1.1 release

27 Mar 14:56
Compare
Choose a tag to compare

Changes

  • Support asynchronous iterators (and asynchronous generators as
    well) in both client and server API as request / response BODY
    payloads. (#2802)

aiohttp 3.1.0 release

22 Mar 02:32
Compare
Choose a tag to compare

Welcome to aiohttp 3.1 release.

This is an incremental release, fully backward compatible with aiohttp 3.0.

But we have added several new features.

The most visible one is app.add_routes() (an alias for existing
app.router.add_routes(). The addition is very important because
all aiohttp docs now uses app.add_routes() call in code
snippets. All your existing code still do register routes / resource
without any warning but you've got the idea for a favorite way: noisy
app.router.add_get() is replaced by app.add_routes().

The library does not make a preference between decorators::

routes = web.RouteTableDef()

@routes.get('/')
async def hello(request):
return web.Response(text="Hello, world")

app.add_routes(routes)

and route tables as a list::

async def hello(request):
return web.Response(text="Hello, world")

app.add_routes([web.get('/', hello)])

Both ways are equal, user may decide basing on own code taste.

Also we have a lot of minor features, bug fixes and documentation
updates, see below.

Features

  • Relax JSON content-type checking in the ClientResponse.json() to allow
    "application/xxx+json" instead of strict "application/json". (#2206)
  • Bump C HTTP parser to version 2.8 (#2730)
  • Accept a coroutine as an application factory in web.run_app and gunicorn
    worker. (#2739)
  • Implement application cleanup context (app.cleanup_ctx property). (#2747)
  • Make writer.write_headers a coroutine. (#2762)
  • Add tracking signals for getting request/response bodies. (#2767)
  • Deprecate ClientResponseError.code in favor of .status to keep similarity
    with response classes. (#2781)
  • Implement app.add_routes() method. (#2787)
  • Implement web.static() and RouteTableDef.static() API. (#2795)
  • Install a test event loop as default by asyncio.set_event_loop(). The
    change affects aiohttp test utils but backward compatibility is not broken
    for 99.99% of use cases. (#2804)
  • Refactor ClientResponse constructor: make logically required constructor
    arguments mandatory, drop _post_init() method. (#2820)
  • Use app.add_routes() in server docs everywhere (#2830)
  • Websockets refactoring, all websocket writer methods are converted into
    coroutines. (#2836)
  • Provide Content-Range header for Range requests (#2844)

Bugfixes

  • Fix websocket client return EofStream. (#2784)
  • Fix websocket demo. (#2789)
  • Property BaseRequest.http_range now returns a python-like slice when
    requesting the tail of the range. It's now indicated by a negative value in
    range.start rather then in range.stop (#2805)
  • Close a connection if an unexpected exception occurs while sending a request
    (#2827)
  • Fix firing DNS tracing events. (#2841)

Improved Documentation

  • Change ClientResponse.json() documentation to reflect that it now
    allows "application/xxx+json" content-types (#2206)
  • Document behavior when cchardet detects encodings that are unknown to Python.
    (#2732)
  • Add diagrams for tracing request life style. (#2748)
  • Drop removed functionality for passing StreamReader as data at client
    side. (#2793)

aiohttp 3.0.9 release

14 Mar 13:35
Compare
Choose a tag to compare

Changes

  • Close a connection if an unexpected exception occurs while sending a request
    (#2827)

aiohttp 3.0.8 release

13 Mar 09:58
Compare
Choose a tag to compare

Changes

  • Use asyncio.current_task() on Python 3.7 (#2825)