diff --git a/aioredis/commands/__init__.py b/aioredis/commands/__init__.py index b8cda1ae8..d543332a3 100644 --- a/aioredis/commands/__init__.py +++ b/aioredis/commands/__init__.py @@ -134,6 +134,7 @@ def select(self, db): @asyncio.coroutine def create_redis(address, *, db=None, password=None, ssl=None, encoding=None, commands_factory=Redis, + timeout=None, loop=None): """Creates high-level Redis interface. @@ -143,6 +144,7 @@ def create_redis(address, *, db=None, password=None, ssl=None, password=password, ssl=ssl, encoding=encoding, + timeout=timeout, loop=loop) return commands_factory(conn) diff --git a/aioredis/commands/sorted_set.py b/aioredis/commands/sorted_set.py index 3d60835c5..6c55e0ab2 100644 --- a/aioredis/commands/sorted_set.py +++ b/aioredis/commands/sorted_set.py @@ -339,7 +339,7 @@ def zrevrangebylex(self, key, min=b'-', max=b'+', include_min=True, if offset is not None and count is not None: args.extend([b'LIMIT', offset, count]) - return self.execute(b'ZREVRANGEBYLEX', key, max, min, *args) + return self._conn.execute(b'ZREVRANGEBYLEX', key, max, min, *args) def zrevrank(self, key, member): """Determine the index of a member in a sorted set, with diff --git a/aioredis/pool.py b/aioredis/pool.py index a477182e6..dbbeb5cc2 100644 --- a/aioredis/pool.py +++ b/aioredis/pool.py @@ -260,7 +260,6 @@ def _fill_free(self, *, override_min): # connection may be closed at yield point self._drop_closed() - @asyncio.coroutine def _create_new_connection(self): return create_redis(self._address, db=self._db, @@ -268,6 +267,7 @@ def _create_new_connection(self): ssl=self._ssl, encoding=self._encoding, commands_factory=self._factory, + timeout=self._create_connection_timeout, loop=self._loop) @asyncio.coroutine