aiohttp 1.1.0 releae
Main news are:
- sub-application support
- using YARL library for working with URLs on both client and server side
- performance improvements
Full list of changes:
-
Drop deprecated
WSClientDisconnectedError
(BACKWARD INCOMPATIBLE) -
Use
yarl.URL
in client API. The change is 99% backward compatible
butClientResponse.url
is anyarl.URL
instance now. #1217 -
Close idle keep-alive connections on shutdown #1222
-
Modify regex in AccessLogger to accept underscore and numbers #1225
-
Use
yarl.URL
in web server API.web.Request.rel_url
and
web.Request.url
are added. URLs and templates are percent-encoded
now. #1224 -
Accept
yarl.URL
by server redirections #1278 -
Return
yarl.URL
by.make_url()
testing utility #1279 -
Properly format IPv6 addresses by
aiohttp.web.run_app
#1139 -
Use
yarl.URL
by server API #1288- Introduce
resource.url_for()
, deprecateresource.url()
. - Implement
StaticResource
. - Inherit
SystemRoute
fromAbstractRoute
- Drop old-style routes:
Route
,PlainRoute
,DynamicRoute
,
StaticRoute
,ResourceAdapter
.
- Introduce
-
Revert
resp.url
back tostr
, introduceresp.url_obj
#1292 -
Raise ValueError if BasicAuth login has a ":" character #1307
-
Fix bug when ClientRequest send payload file with opened as
open('filename', 'r+b') #1306 -
Enhancement to AccessLogger (pass extra dict) #1303
-
Show more verbose message on import errors #1319
-
Added save and load functionality for
CookieJar
#1219 -
Added option on
StaticRoute
to follow symlinks #1299 -
Force encoding of
application/json
content type to utf-8 #1339 -
Fix invalid invocations of
errors.LineTooLong
#1335 -
Websockets: Stop
async for
iteration when connection is closed #1144 -
Ensure TestClient HTTP methods return a context manager #1318
-
Raise
ClientDisconnectedError
toFlowControlStreamReader
read function
ifClientSession
object is closed by client when reading data. #1323 -
Document deployment without
Gunicorn
#1120 -
Add deprecation warning for MD5 and SHA1 digests when used for fingerprint
of site certs in TCPConnector. #1186 -
Implement sub-applications #1301
-
Don't inherit
web.Request
fromdict
but implement
MutableMapping
protocol. -
Implement frozen signals
-
Don't inherit
web.Application
fromdict
but implement
MutableMapping
protocol. -
Support freezing for web applications
-
Accept access_log parameter in
web.run_app
, useNone
to disable logging -
Don't flap
tcp_cork
andtcp_nodelay
in regular request handling.
tcp_nodelay
is still enabled by default. -
Improve performance of web server by removing premature computing of
Content-Type if the value was set byweb.Response
constructor.While the patch boosts speed of trivial
web.Response(text='OK', content_type='text/plain)
very well please don't expect significant
boost of your application -- a couple DB requests and business logic
is still the main bottleneck. -
Boost performance by adding a custom time service #1350
-
Extend
ClientResponse
withcontent_type
andcharset
properties like inweb.Request
. #1349 -
Disable aiodns by default #559
-
Don't flap
tcp_cork
in client code, use TCP_NODELAY mode by default. -
Implement
web.Request.clone()
#1361