Skip to content

Commit d89f6b7

Browse files
gyermolenkoasvetlov
authored andcommitted
Fix in demos related to async-await syntax (#123)
- remove 3.4 version from setup.py - add cryprography package to requirements since it is used in dictionary_auth - add a few missed async kwords
1 parent db7dbd9 commit d89f6b7

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

demo/database_auth/db_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class DBAuthorizationPolicy(AbstractAuthorizationPolicy):
1010
def __init__(self, dbengine):
1111
self.dbengine = dbengine
1212

13-
def authorized_userid(self, identity):
13+
async def authorized_userid(self, identity):
1414
async with self.dbengine as conn:
1515
where = sa.and_(db.users.c.login == identity,
1616
sa.not_(db.users.c.disabled))

demo/database_auth/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from demo.handlers import Web
1414

1515

16-
def init(loop):
16+
async def init(loop):
1717
redis_pool = await create_pool(('localhost', 6379))
1818
db_engine = await create_engine(user='aiohttp_security',
1919
password='aiohttp_security',

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ aiopg[sa]==0.13.1
1010
aioredis==1.0.0
1111
hiredis==0.2.0
1212
passlib==1.7.1
13+
cryptography==2.1.4
1314
aiohttp==2.3.7
1415
pytest-aiohttp==0.3.0

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def read(f):
4242
'Intended Audience :: Developers',
4343
'Programming Language :: Python',
4444
'Programming Language :: Python :: 3',
45-
'Programming Language :: Python :: 3.4',
4645
'Programming Language :: Python :: 3.5',
4746
'Programming Language :: Python :: 3.6',
4847
'Topic :: Internet :: WWW/HTTP',

0 commit comments

Comments
 (0)