Skip to content

Commit f2d6147

Browse files
committed
Fix docs
1 parent a1cc4ef commit f2d6147

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ Available session storages are:
8080
* ``aiohttp_session.redis_storage.RedisStorage(redis_pool)`` -- stores
8181
JSON encoded data in *redis*, keeping only the redis key (a random UUID) in
8282
the cookie. ``redis_pool`` is a ``aioredis`` pool object, created by
83-
``yield from aioredis.create_pool(...)`` call.
83+
``await aioredis.create_resid_pool(...)`` call.
8484

85-
Requires ``aioredis`` library::
85+
Requires ``aioredis`` library (olny versions ``1.0+`` are supported::
8686

8787
$ pip install aiohttp_session[aioredis]
8888

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ A trivial usage example::
3131
from aiohttp_session.cookie_storage import EncryptedCookieStorage
3232

3333
async def handler(request):
34-
session = yield from get_session(request)
34+
session = await get_session(request)
3535
session['last_visit'] = time.time()
3636
return web.Response(body=b'OK')
3737

docs/reference.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ Session
7575

7676
from aiohttp_session import get_session
7777

78-
@asyncio.coroutine
79-
def handler(request):
80-
session = yield from get_session(request)
78+
async def handler(request):
79+
session = await get_session(request)
8180
session['key1'] = 'value 1'
8281
assert 'key2' in session
8382
assert session['key2'] == 'value 2'
@@ -381,8 +380,8 @@ To use the storage you need setup it first::
381380

382381
*memcached_conn* is a :class:`~aiomcache.Client` instance::
383382

384-
mc = yield from aiomcache.Client('localhost', 6379)
385-
storage = aiohttp_session.memcached_storage.MemcachedStorage(redis)
383+
mc = await aiomcache.Client('localhost', 6379)
384+
storage = aiohttp_session.memcached_storage.MemcachedStorage(mc
386385

387386
Other parameters are the same as for
388387
:class:`~aiohttp_session.AbstractStorage` constructor.

0 commit comments

Comments
 (0)