-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreproduce_issue.py
More file actions
29 lines (23 loc) · 1022 Bytes
/
Copy pathreproduce_issue.py
File metadata and controls
29 lines (23 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import asyncio
from kvdb.components.connection import AsyncConnection
from redis.asyncio.connection import Connection as RedisAsyncConnection
async def main():
print("Testing AsyncConnection instantiation...")
try:
# Initialize AsyncConnection, which should set host via super().__init__ or similar
conn = AsyncConnection(host='localhost', port=6379, db=0)
print(f"Connection created: {conn}")
# Try to access host
print(f"Host: {conn.host}")
# Try to access _connection_arguments if it exists (redis 5.x) or just mimic the error
try:
args = conn._connection_arguments()
print(f"Connection args: {args}")
except AttributeError as e:
print(f"Failed to get connection args: {e}")
except AttributeError as e:
print(f"Caught expected error: {e}")
except Exception as e:
print(f"Caught unexpected error: {e}")
if __name__ == "__main__":
asyncio.run(main())