redis 6.1.0__py3-none-any.whl → 6.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
redis/__init__.py CHANGED
@@ -47,7 +47,7 @@ def int_or_str(value):
47
47
 
48
48
  # This is the version of redis-py that is being used
49
49
  # for building and installing the lib.
50
- __version__ = "6.1.0"
50
+ __version__ = "6.1.1"
51
51
  VERSION = tuple(map(int_or_str, __version__.split(".")))
52
52
 
53
53
 
@@ -868,7 +868,7 @@ class RedisSSLContext:
868
868
  cert_reqs: Optional[Union[str, ssl.VerifyMode]] = None,
869
869
  ca_certs: Optional[str] = None,
870
870
  ca_data: Optional[str] = None,
871
- check_hostname: bool = True,
871
+ check_hostname: bool = False,
872
872
  min_version: Optional[TLSVersion] = None,
873
873
  ciphers: Optional[str] = None,
874
874
  ):
redis/client.py CHANGED
@@ -369,6 +369,8 @@ class Redis(RedisModuleCommands, CoreCommands, SentinelCommands):
369
369
  ]:
370
370
  raise RedisError("Client caching is only supported with RESP version 3")
371
371
 
372
+ # TODO: To avoid breaking changes during the bug fix, we have to keep non-reentrant lock.
373
+ # TODO: Remove this before next major version (7.0.0)
372
374
  self.single_connection_lock = threading.Lock()
373
375
  self.connection = None
374
376
  self._single_connection_client = single_connection_client
@@ -774,6 +776,9 @@ class PubSub:
774
776
  self._event_dispatcher = EventDispatcher()
775
777
  else:
776
778
  self._event_dispatcher = event_dispatcher
779
+
780
+ # TODO: To avoid breaking changes during the bug fix, we have to keep non-reentrant lock.
781
+ # TODO: Remove this before next major version (7.0.0)
777
782
  self._lock = threading.Lock()
778
783
  if self.encoder is None:
779
784
  self.encoder = self.connection_pool.get_encoder()
redis/cluster.py CHANGED
@@ -710,7 +710,7 @@ class RedisCluster(AbstractRedisCluster, RedisClusterCommands):
710
710
  self.result_callbacks = CaseInsensitiveDict(self.__class__.RESULT_CALLBACKS)
711
711
 
712
712
  self.commands_parser = CommandsParser(self)
713
- self._lock = threading.Lock()
713
+ self._lock = threading.RLock()
714
714
 
715
715
  def __enter__(self):
716
716
  return self
@@ -1474,7 +1474,7 @@ class NodesManager:
1474
1474
  self.connection_kwargs = kwargs
1475
1475
  self.read_load_balancer = LoadBalancer()
1476
1476
  if lock is None:
1477
- lock = threading.Lock()
1477
+ lock = threading.RLock()
1478
1478
  self._lock = lock
1479
1479
  if event_dispatcher is None:
1480
1480
  self._event_dispatcher = EventDispatcher()
@@ -2178,7 +2178,7 @@ class ClusterPipeline(RedisCluster):
2178
2178
  kwargs.get("decode_responses", False),
2179
2179
  )
2180
2180
  if lock is None:
2181
- lock = threading.Lock()
2181
+ lock = threading.RLock()
2182
2182
  self._lock = lock
2183
2183
  self.parent_execute_command = super().execute_command
2184
2184
  self._execution_strategy: ExecutionStrategy = (
redis/connection.py CHANGED
@@ -820,7 +820,7 @@ class CacheProxyConnection(ConnectionInterface):
820
820
  self.credential_provider = conn.credential_provider
821
821
  self._pool_lock = pool_lock
822
822
  self._cache = cache
823
- self._cache_lock = threading.Lock()
823
+ self._cache_lock = threading.RLock()
824
824
  self._current_command_cache_key = None
825
825
  self._current_options = None
826
826
  self.register_connect_callback(self._enable_tracking_callback)
@@ -1420,8 +1420,16 @@ class ConnectionPool:
1420
1420
  # object of this pool. subsequent threads acquiring this lock
1421
1421
  # will notice the first thread already did the work and simply
1422
1422
  # release the lock.
1423
- self._fork_lock = threading.Lock()
1424
- self._lock = threading.Lock()
1423
+
1424
+ self._fork_lock = threading.RLock()
1425
+
1426
+ if self.cache is None:
1427
+ self._lock = threading.RLock()
1428
+ else:
1429
+ # TODO: To avoid breaking changes during the bug fix, we have to keep non-reentrant lock.
1430
+ # TODO: Remove this before next major version (7.0.0)
1431
+ self._lock = threading.Lock()
1432
+
1425
1433
  self.reset()
1426
1434
 
1427
1435
  def __repr__(self) -> (str, str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: redis
3
- Version: 6.1.0
3
+ Version: 6.1.1
4
4
  Summary: Python client for Redis database and key-value store
5
5
  Project-URL: Changes, https://github.com/redis/redis-py/releases
6
6
  Project-URL: Code, https://github.com/redis/redis-py
@@ -1,9 +1,9 @@
1
- redis/__init__.py,sha256=-M8cA3QGivn45l9qd2LkwAid1y9uT_dj_qFBByBDkBI,2088
1
+ redis/__init__.py,sha256=v4Hs3gUcTOHjfzv2DYugQ2S2aSXHd6nRq0MNSVy7RZc,2088
2
2
  redis/backoff.py,sha256=2zR-ik5enJDsC2n2AWmE3ALSONgDLtyO4k096ZT6Txo,5275
3
3
  redis/cache.py,sha256=68rJDNogvNwgdgBel6zSX9QziL11qsKIMhmvQvHvznM,9549
4
- redis/client.py,sha256=ZGKGLJdRwwgY4w01Ag4MOh6bI8g7pP9NYZn7-OamzOU,62486
5
- redis/cluster.py,sha256=DvB9HMqXWziH99SJhxyCxBrrGNUWKebkVl-Jyp5avuM,123808
6
- redis/connection.py,sha256=4ibOCqygzOSn77d-vpLORDg9TZEKV_ME13Kt4kE2ySM,66666
4
+ redis/client.py,sha256=9mspL8Dg8T7R8RJp47y-1157IkgzvamXwgEPPLAg_h8,62807
5
+ redis/cluster.py,sha256=wmuctaVQbXdeRktMKxRkHhZdTNBB3TLbwobCApdE7wU,123811
6
+ redis/connection.py,sha256=rbu62qHQmzZXRsIu0wljl9gk1nEM8gAjSNcfmFqQVd0,66931
7
7
  redis/crc.py,sha256=Z3kXFtkY2LdgefnQMud1xr4vG5UYvA9LCMqNMX1ywu4,729
8
8
  redis/credentials.py,sha256=GOnO3-LSW34efHaIrUbS742Mw8l70mRzF6UrKiKZsMY,1828
9
9
  redis/event.py,sha256=urOK241IdgmCQ3fq7GqXRstZ2vcXRV14bBBMdN3latk,12129
@@ -27,7 +27,7 @@ redis/_parsers/socket.py,sha256=CKD8QW_wFSNlIZzxlbNduaGpiv0I8wBcsGuAIojDfJg,5403
27
27
  redis/asyncio/__init__.py,sha256=uoDD8XYVi0Kj6mcufYwLDUTQXmBRx7a0bhKF9stZr7I,1489
28
28
  redis/asyncio/client.py,sha256=xZNHB8SEWe_CrDOrNoKUEZMW4Aw_zKF0iygD7MOsujI,61954
29
29
  redis/asyncio/cluster.py,sha256=190gM2GMnvrOhOI1I6t2ogS9UkMeokqe-uiFOtHk_1M,67891
30
- redis/asyncio/connection.py,sha256=TpqWKA-MSiK1P0xCMivp438YCZY1CeOKfec6vH9txU4,48943
30
+ redis/asyncio/connection.py,sha256=AdsKxm-UlqFQQojP7hRDm-cTI5-KeavJkST-8zSif80,48944
31
31
  redis/asyncio/lock.py,sha256=GxgV6EsyKpMjh74KtaOPxh4fNPuwApz6Th46qhvrAws,12801
32
32
  redis/asyncio/retry.py,sha256=8carxJLme2f0frB9Z0wU3mHqKzwqzGAGb2TMEtaaMvo,2482
33
33
  redis/asyncio/sentinel.py,sha256=H7N_hvdATojwY06aH1AawFV-05AImqtOSAq0xKElbbk,14636
@@ -72,7 +72,7 @@ redis/commands/timeseries/utils.py,sha256=NLwSOS5Dz9N8dYQSzEyBIvrItOWwfQ0xgDj8un
72
72
  redis/commands/vectorset/__init__.py,sha256=_fM0UdYjuzs8YWIUjQGH9QX5FwI0So8_D-5ALWWrWFc,1322
73
73
  redis/commands/vectorset/commands.py,sha256=7CvQNFvkXuG3XPhHJ82y_oBYJwewRFz84aEi3OCH4Rw,12495
74
74
  redis/commands/vectorset/utils.py,sha256=N-x0URyg76XC39CNfBym6FkFCVgm5NthzWKBnc2H0Xc,2981
75
- redis-6.1.0.dist-info/METADATA,sha256=RJYbOKZYAVABc_B3-eouMHIHk7v-6gL8c01wl_N7Mkc,10644
76
- redis-6.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
77
- redis-6.1.0.dist-info/licenses/LICENSE,sha256=pXslClvwPXr-VbdAYzE_Ktt7ANVGwKsUmok5gzP-PMg,1074
78
- redis-6.1.0.dist-info/RECORD,,
75
+ redis-6.1.1.dist-info/METADATA,sha256=_9FLKERagTPwBAm2ISdJ3GcENz4Mn5TjHrXrjlIg8Eg,10644
76
+ redis-6.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
77
+ redis-6.1.1.dist-info/licenses/LICENSE,sha256=pXslClvwPXr-VbdAYzE_Ktt7ANVGwKsUmok5gzP-PMg,1074
78
+ redis-6.1.1.dist-info/RECORD,,
File without changes