|
9 | 9 | from itertools import chain
|
10 | 10 | from queue import Empty, Full, LifoQueue
|
11 | 11 | from time import time
|
12 |
| -from typing import Any, Callable, List, Optional, Type, Union, Dict |
| 12 | +from typing import Any, Callable, Dict, List, Optional, Type, Union |
13 | 13 | from urllib.parse import parse_qs, unquote, urlparse
|
14 | 14 |
|
15 | 15 | from redis.cache import (
|
|
41 | 41 | HIREDIS_AVAILABLE,
|
42 | 42 | HIREDIS_PACK_AVAILABLE,
|
43 | 43 | SSL_AVAILABLE,
|
| 44 | + compare_versions, |
44 | 45 | format_error_message,
|
45 | 46 | get_lib_version,
|
46 |
| - str_if_bytes, compare_versions, |
| 47 | + str_if_bytes, |
47 | 48 | )
|
48 | 49 |
|
49 | 50 | if HIREDIS_AVAILABLE:
|
@@ -745,7 +746,7 @@ def ensure_string(key):
|
745 | 746 |
|
746 | 747 | class CacheProxyConnection(ConnectionInterface):
|
747 | 748 | DUMMY_CACHE_VALUE = b"foo"
|
748 |
| - MIN_ALLOWED_VERSION = '7.4.0' |
| 749 | + MIN_ALLOWED_VERSION = "7.4.0" |
749 | 750 |
|
750 | 751 | def __init__(self, conn: ConnectionInterface, cache: CacheInterface):
|
751 | 752 | self.pid = os.getpid()
|
@@ -892,6 +893,10 @@ def pack_command(self, *args):
|
892 | 893 | def pack_commands(self, commands):
|
893 | 894 | return self._conn.pack_commands(commands)
|
894 | 895 |
|
| 896 | + @property |
| 897 | + def handshake_metadata(self) -> Union[Dict[bytes, bytes], Dict[str, str]]: |
| 898 | + return self._conn.handshake_metadata |
| 899 | + |
895 | 900 | def _connect(self):
|
896 | 901 | self._conn._connect()
|
897 | 902 |
|
|
0 commit comments