coredis 4.23.0__py3-none-any.whl → 4.24.0__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.
- coredis/_version.py +3 -3
- coredis/commands/function.py +10 -5
- coredis/commands/pubsub.py +1 -3
- {coredis-4.23.0.dist-info → coredis-4.24.0.dist-info}/METADATA +1 -1
- {coredis-4.23.0.dist-info → coredis-4.24.0.dist-info}/RECORD +8 -8
- {coredis-4.23.0.dist-info → coredis-4.24.0.dist-info}/WHEEL +0 -0
- {coredis-4.23.0.dist-info → coredis-4.24.0.dist-info}/licenses/LICENSE +0 -0
- {coredis-4.23.0.dist-info → coredis-4.24.0.dist-info}/top_level.txt +0 -0
coredis/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-
|
|
11
|
+
"date": "2025-07-05T19:34:23-0700",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "4.
|
|
14
|
+
"full-revisionid": "cd4583e1ad0eb6d8ca23e80203ab230efe1e3b2e",
|
|
15
|
+
"version": "4.24.0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
coredis/commands/function.py
CHANGED
|
@@ -107,11 +107,17 @@ class Library(Generic[AnyStr]):
|
|
|
107
107
|
return False
|
|
108
108
|
|
|
109
109
|
async def initialize(self: LibraryT, replace: bool = False) -> LibraryT:
|
|
110
|
+
from coredis.pipeline import ClusterPipelineImpl, PipelineImpl # type: ignore
|
|
111
|
+
|
|
110
112
|
self._functions.clear()
|
|
111
|
-
|
|
113
|
+
if isinstance(self.client, (PipelineImpl, ClusterPipelineImpl)):
|
|
114
|
+
redis_client = self.client.client
|
|
115
|
+
else:
|
|
116
|
+
redis_client = self.client
|
|
117
|
+
library = (await redis_client.function_list(self.name)).get(self.name)
|
|
112
118
|
if (not library and self.code) or (replace or self.replace):
|
|
113
|
-
await
|
|
114
|
-
library = (await
|
|
119
|
+
await redis_client.function_load(self.code, replace=replace or self.replace)
|
|
120
|
+
library = (await redis_client.function_list(self.name)).get(self.name)
|
|
115
121
|
|
|
116
122
|
if not library:
|
|
117
123
|
raise FunctionError(f"No library found for {self.name}")
|
|
@@ -320,8 +326,7 @@ class Library(Generic[AnyStr]):
|
|
|
320
326
|
@functools.wraps(func)
|
|
321
327
|
async def _inner(*args: P.args, **kwargs: P.kwargs) -> R:
|
|
322
328
|
instance, keys, arguments = split_args(*args, **kwargs)
|
|
323
|
-
func
|
|
324
|
-
if not func:
|
|
329
|
+
if (func := instance.functions.get(function_name, None)) is None:
|
|
325
330
|
raise AttributeError(
|
|
326
331
|
f"Library {instance.name} has no registered function {function_name}"
|
|
327
332
|
)
|
coredis/commands/pubsub.py
CHANGED
|
@@ -479,7 +479,7 @@ class BasePubSub(Generic[AnyStr, PoolT]):
|
|
|
479
479
|
return thread
|
|
480
480
|
|
|
481
481
|
async def _consumer(self) -> None:
|
|
482
|
-
while
|
|
482
|
+
while self.initialized:
|
|
483
483
|
try:
|
|
484
484
|
if self.subscribed:
|
|
485
485
|
if response := await self._retry_policy.call_with_retries(
|
|
@@ -489,8 +489,6 @@ class BasePubSub(Generic[AnyStr, PoolT]):
|
|
|
489
489
|
self._message_queue.put_nowait(await self.handle_message(response))
|
|
490
490
|
else:
|
|
491
491
|
await self._subscribed.wait()
|
|
492
|
-
except asyncio.CancelledError:
|
|
493
|
-
break
|
|
494
492
|
except ConnectionError:
|
|
495
493
|
await asyncio.sleep(0)
|
|
496
494
|
|
|
@@ -4,7 +4,7 @@ coredis/_packer.py,sha256=sITBjvt5nLVkUL7VEwDhwT48M_hIDIME3xUt1dXSkzc,2640
|
|
|
4
4
|
coredis/_protocols.py,sha256=PDkY2LQEfA2_SRmC-LDDdhrt-uAnkvmHMZUR3aoCbzc,1868
|
|
5
5
|
coredis/_sidecar.py,sha256=ci3hx7RojTdodMqe_zf07HL-E6DlqSliscENTa3dbzI,4404
|
|
6
6
|
coredis/_utils.py,sha256=Yh4s8uXYIRuItnIAgA2VcykhwYAmYrBv7P1tH5-W6rY,10528
|
|
7
|
-
coredis/_version.py,sha256=
|
|
7
|
+
coredis/_version.py,sha256=sr8RHV8xLIy7M2O_qOmA-NeCtgdpr2frMPcfHUxZ2HY,498
|
|
8
8
|
coredis/cache.py,sha256=dtAJwxf0zDiEhjtHkmo6N4rujT_Zs46o9a6RrhytIYE,27132
|
|
9
9
|
coredis/config.py,sha256=Ni2uXMNzdfSRDEJl0KxrS78shLszfYM-ZbE7GK_O7Pk,1368
|
|
10
10
|
coredis/connection.py,sha256=DhgTTY_pjrjPPE7L035r-4KaUI_6FilLRSqrvFo_Pss,30860
|
|
@@ -34,9 +34,9 @@ coredis/commands/_wrappers.py,sha256=GSMP1vCI8L5QJ4tQfY1cYA5xum0m7knXylrhtt8GzyI
|
|
|
34
34
|
coredis/commands/bitfield.py,sha256=MQrbgy6RcStpKUETc0ZWd9NiX-vFZfDQdLjUTNDFhG4,3174
|
|
35
35
|
coredis/commands/constants.py,sha256=YhMH-uFXa8ndOlpDpIB2WdesPj_G8A1dhL4wj-r0ARY,29600
|
|
36
36
|
coredis/commands/core.py,sha256=gOwHUH7QikgfIPgeswii1JhoAcb92t8itCaZSAU7oWY,258870
|
|
37
|
-
coredis/commands/function.py,sha256=
|
|
37
|
+
coredis/commands/function.py,sha256=WrnquFidZTr7ca8kgrJyNIaASQcN3aLZx-ALwSJEw8E,16245
|
|
38
38
|
coredis/commands/monitor.py,sha256=saUjHvyWaUxQkGBDIyUEp_rAWKzJaIeCryy9fW_AkUw,8068
|
|
39
|
-
coredis/commands/pubsub.py,sha256=
|
|
39
|
+
coredis/commands/pubsub.py,sha256=MYiKfbK6CYlq-PAPFnW6Wt7tJqn73kDLRXSrTG0-LgU,38786
|
|
40
40
|
coredis/commands/script.py,sha256=VSonsIm1tMbuY7NZatKgaS-SrsQJ1j7NRczdcJgAhYc,12223
|
|
41
41
|
coredis/commands/sentinel.py,sha256=RdQvDBQyrONTjIwKatJbQXmrpo7x2Dh7kCLmu5nicBs,7531
|
|
42
42
|
coredis/experimental/__init__.py,sha256=gUuGifF_kVqVmvdrXoOISU7V1cvubdZKSGefPwsGuD8,126
|
|
@@ -86,8 +86,8 @@ coredis/response/_callbacks/sets.py,sha256=p0XAQFkSEpBio4npOT6-lQR8NCbdlstq77In1
|
|
|
86
86
|
coredis/response/_callbacks/sorted_set.py,sha256=xhUFjF0d388LTr3UVPDvTRviTy4UD7IL2zevoPHmmsQ,6621
|
|
87
87
|
coredis/response/_callbacks/streams.py,sha256=N7SrckFWgBwRWvOfp2Exo23pd2giXC4J4TIm9dzBiHQ,6355
|
|
88
88
|
coredis/response/_callbacks/strings.py,sha256=iEF7K9qYjlWhruh3lzbxHUjGhhIzA549QgAY4GO29us,1983
|
|
89
|
-
coredis-4.
|
|
90
|
-
coredis-4.
|
|
91
|
-
coredis-4.
|
|
92
|
-
coredis-4.
|
|
93
|
-
coredis-4.
|
|
89
|
+
coredis-4.24.0.dist-info/licenses/LICENSE,sha256=pTSTkaH3iX2r6C88El9edMoi6r_Og6Wf4b6Zgq-LSOQ,1107
|
|
90
|
+
coredis-4.24.0.dist-info/METADATA,sha256=urMbRDK9DnP0TINvryGGuxXRNDy128QNjuMIxOXRQkw,9152
|
|
91
|
+
coredis-4.24.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
92
|
+
coredis-4.24.0.dist-info/top_level.txt,sha256=PWp3SlvenceLQUL9VJ1_rKwKoi-U9g3KDJS5ws8tOG8,8
|
|
93
|
+
coredis-4.24.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|