coredis 4.23.1__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.

Potentially problematic release.


This version of coredis might be problematic. Click here for more details.

coredis/_version.py CHANGED
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-06-20T20:01:58-0700",
11
+ "date": "2025-07-05T19:34:23-0700",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "1205cfeb7a65ac8807380f8c5eb8596ac31791e9",
15
- "version": "4.23.1"
14
+ "full-revisionid": "cd4583e1ad0eb6d8ca23e80203ab230efe1e3b2e",
15
+ "version": "4.24.0"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -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
- library = (await self.client.function_list(self.name)).get(self.name)
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 self.client.function_load(self.code, replace=replace or self.replace)
114
- library = (await self.client.function_list(self.name)).get(self.name)
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 = instance.functions[function_name]
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
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coredis
3
- Version: 4.23.1
3
+ Version: 4.24.0
4
4
  Summary: Python async client for Redis key-value store
5
5
  Home-page: https://github.com/alisaifee/coredis
6
6
  Author: Ali-Akber Saifee
@@ -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=3i2LIRvWEQEg1K_xx8-8jLGorWU2K5uNB8xwGUge7Iw,498
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,7 +34,7 @@ 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=hJuIHB7J13kz85l7eDahQfMjBuWBseBFm3scFpSztaQ,15986
37
+ coredis/commands/function.py,sha256=WrnquFidZTr7ca8kgrJyNIaASQcN3aLZx-ALwSJEw8E,16245
38
38
  coredis/commands/monitor.py,sha256=saUjHvyWaUxQkGBDIyUEp_rAWKzJaIeCryy9fW_AkUw,8068
39
39
  coredis/commands/pubsub.py,sha256=MYiKfbK6CYlq-PAPFnW6Wt7tJqn73kDLRXSrTG0-LgU,38786
40
40
  coredis/commands/script.py,sha256=VSonsIm1tMbuY7NZatKgaS-SrsQJ1j7NRczdcJgAhYc,12223
@@ -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.23.1.dist-info/licenses/LICENSE,sha256=pTSTkaH3iX2r6C88El9edMoi6r_Og6Wf4b6Zgq-LSOQ,1107
90
- coredis-4.23.1.dist-info/METADATA,sha256=8ETQaa5diq6xNwYNo5_YVPUwCgoi2A4Zj5zolFmmTfs,9152
91
- coredis-4.23.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
92
- coredis-4.23.1.dist-info/top_level.txt,sha256=PWp3SlvenceLQUL9VJ1_rKwKoi-U9g3KDJS5ws8tOG8,8
93
- coredis-4.23.1.dist-info/RECORD,,
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,,