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
This commit is contained in:
Grygorii Yermolenko 2018-01-02 14:31:19 +02:00 committed by Andrew Svetlov
parent db7dbd9b07
commit d89f6b7e3d
4 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ class DBAuthorizationPolicy(AbstractAuthorizationPolicy):
def __init__(self, dbengine):
self.dbengine = dbengine
def authorized_userid(self, identity):
async def authorized_userid(self, identity):
async with self.dbengine as conn:
where = sa.and_(db.users.c.login == identity,
sa.not_(db.users.c.disabled))

View File

@ -13,7 +13,7 @@ from demo.db_auth import DBAuthorizationPolicy
from demo.handlers import Web
def init(loop):
async def init(loop):
redis_pool = await create_pool(('localhost', 6379))
db_engine = await create_engine(user='aiohttp_security',
password='aiohttp_security',

View File

@ -10,5 +10,6 @@ aiopg[sa]==0.13.1
aioredis==1.0.0
hiredis==0.2.0
passlib==1.7.1
cryptography==2.1.4
aiohttp==2.3.7
pytest-aiohttp==0.3.0

View File

@ -42,7 +42,6 @@ setup(name='aiohttp-security',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP',