Skip to content

Async pipeline doesn't work with some commands in 5.1 #3391

@RafalBielickiIM

Description

@RafalBielickiIM

Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!

Version: 5.1

Platform: Tested on 3.10,3.11,3.12 on Ubuntu & OSX

Description:

redis = Redis(host='localhost', port=6379)
await redis.ping()
pipe = redis.pipeline()
pipe.hgetall('test')
await pipe.execute()```

```TypeError                                 Traceback (most recent call last)
Cell In[46], line 6
      4 pipe = redis.pipeline()
      5 pipe.hgetall('test')
----> 6 await pipe.execute()

File ~//lib/python3.12/site-packages/redis/asyncio/client.py:1533, in Pipeline.execute(self, raise_on_error)
   1530 conn = cast(Connection, conn)
   1532 try:
-> 1533     return await conn.retry.call_with_retry(
   1534         lambda: execute(conn, stack, raise_on_error),
   1535         lambda error: self._disconnect_raise_reset(conn, error),
   1536     )
   1537 finally:
   1538     await self.reset()

File ~/lib/python3.12/site-packages/redis/asyncio/retry.py:59, in Retry.call_with_retry(self, do, fail)
     57 while True:
     58     try:
---> 59         return await do()
     60     except self._supported_errors as error:
     61         failures += 1

File ~/lib/python3.12/site-packages/redis/asyncio/client.py:1427, in Pipeline._execute_transaction(self, connection, commands, raise_on_error)
   1425 command_name = args[0]
   1426 if command_name in self.response_callbacks:
-> 1427     r = self.response_callbacks[command_name](r, **options)
   1428     if inspect.isawaitable(r):
   1429         r = await r

TypeError: <lambda>() got an unexpected keyword argument 'keys'```

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions