Skip to content

Commit 7efcacd

Browse files
author
misha.gavela
committed
start to fix problem connected with aiohttp release 3.0.0
1 parent 9b460a5 commit 7efcacd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

aiohttp_admin/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def token(self, request):
5252
await authorize(request, data['username'], data['password'])
5353

5454
router = request.app.router
55-
location = router["admin.index"].url()
55+
location = router["admin.index"].url_for().human_repr()
5656
payload = {"location": location}
5757
response = json_response(payload)
5858
await remember(request, response, data['username'])
@@ -63,7 +63,7 @@ async def logout(self, request):
6363
msg = "Auth header is not present, can not destroy token"
6464
raise JsonValidaitonError(msg)
6565
router = request.app.router
66-
location = router["admin.login"].url()
66+
location = router["admin.login"].url_for().human_repr()
6767
payload = {"location": location}
6868
response = json_response(payload)
6969
await forget(request, response)

demos/motortwit/motortwit/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async def timeline(self, request):
2626

2727
if user_id is None:
2828
router = request.app.router
29-
location = router['public_timeline'].url()
29+
location = router['public_timeline'].url_for().human_repr()
3030
raise web.HTTPFound(location=location)
3131
user = await self.mongo.user.find_one({'_id': ObjectId(user_id)})
3232

tests/rest_fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async def create(*, debug=False, ssl_ctx=None, proto='http'):
158158
url = "{}://127.0.0.1:{}".format(proto, port)
159159

160160
async def app_starter():
161-
handler = app.make_handler(keep_alive_on=False)
161+
handler = app.make_handler(tcp_keepalive=False)
162162
srv = await loop.create_server(handler, '127.0.0.1', port,
163163
ssl=ssl_ctx)
164164
cleanup.append((app, handler, srv))

0 commit comments

Comments
 (0)