dycw-utilities 0.112.11__py3-none-any.whl → 0.112.13__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.
- {dycw_utilities-0.112.11.dist-info → dycw_utilities-0.112.13.dist-info}/METADATA +3 -3
- {dycw_utilities-0.112.11.dist-info → dycw_utilities-0.112.13.dist-info}/RECORD +6 -6
- utilities/__init__.py +1 -1
- utilities/redis.py +9 -5
- {dycw_utilities-0.112.11.dist-info → dycw_utilities-0.112.13.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.112.11.dist-info → dycw_utilities-0.112.13.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: dycw-utilities
|
3
|
-
Version: 0.112.
|
3
|
+
Version: 0.112.13
|
4
4
|
Author-email: Derek Wan <d.wan@icloud.com>
|
5
5
|
License-File: LICENSE
|
6
6
|
Requires-Python: >=3.12
|
@@ -84,7 +84,7 @@ Requires-Dist: hypothesis<6.132,>=6.131.9; extra == 'zzz-test-hypothesis'
|
|
84
84
|
Requires-Dist: luigi<3.7,>=3.6.0; extra == 'zzz-test-hypothesis'
|
85
85
|
Requires-Dist: numpy<2.3,>=2.2.5; extra == 'zzz-test-hypothesis'
|
86
86
|
Requires-Dist: pathvalidate<3.3,>=3.2.3; extra == 'zzz-test-hypothesis'
|
87
|
-
Requires-Dist: redis<
|
87
|
+
Requires-Dist: redis<6.1,>=6.0.0; extra == 'zzz-test-hypothesis'
|
88
88
|
Requires-Dist: sqlalchemy<2.1,>=2.0.40; extra == 'zzz-test-hypothesis'
|
89
89
|
Requires-Dist: tenacity<9.0,>=8.5.0; extra == 'zzz-test-hypothesis'
|
90
90
|
Requires-Dist: tzlocal<5.4,>=5.3.1; extra == 'zzz-test-hypothesis'
|
@@ -165,7 +165,7 @@ Provides-Extra: zzz-test-re
|
|
165
165
|
Provides-Extra: zzz-test-redis
|
166
166
|
Requires-Dist: orjson<3.11,>=3.10.15; extra == 'zzz-test-redis'
|
167
167
|
Requires-Dist: polars-lts-cpu<1.30,>=1.29.0; extra == 'zzz-test-redis'
|
168
|
-
Requires-Dist: redis<
|
168
|
+
Requires-Dist: redis<6.1,>=6.0.0; extra == 'zzz-test-redis'
|
169
169
|
Requires-Dist: rich<14.1,>=14.0.0; extra == 'zzz-test-redis'
|
170
170
|
Requires-Dist: tenacity<9.0,>=8.5.0; extra == 'zzz-test-redis'
|
171
171
|
Requires-Dist: tzlocal<5.4,>=5.3.1; extra == 'zzz-test-redis'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=BNmG5-3ficTmieJpU_Y3lnG8RPyYTmqf6b0EGn9rM5I,61
|
2
2
|
utilities/altair.py,sha256=Gpja-flOo-Db0PIPJLJsgzAlXWoKUjPU1qY-DQ829ek,9156
|
3
3
|
utilities/astor.py,sha256=xuDUkjq0-b6fhtwjhbnebzbqQZAjMSHR1IIS5uOodVg,777
|
4
4
|
utilities/asyncio.py,sha256=41oQUurWMvadFK5gFnaG21hMM0Vmfn2WS6OpC0R9mas,14757
|
@@ -58,7 +58,7 @@ utilities/pytest_regressions.py,sha256=-SVT9647Dg6-JcdsiaDKXe3NdOmmrvGevLKWwGjxq
|
|
58
58
|
utilities/python_dotenv.py,sha256=iWcnpXbH7S6RoXHiLlGgyuH6udCupAcPd_gQ0eAenQ0,3190
|
59
59
|
utilities/random.py,sha256=lYdjgxB7GCfU_fwFVl5U-BIM_HV3q6_urL9byjrwDM8,4157
|
60
60
|
utilities/re.py,sha256=5J4d8VwIPFVrX2Eb8zfoxImDv7IwiN_U7mJ07wR2Wvs,3958
|
61
|
-
utilities/redis.py,sha256=
|
61
|
+
utilities/redis.py,sha256=jpBq5dEKthxLgS68Bj-dksfGqFl-RrRGK-x5-6owDVI,25438
|
62
62
|
utilities/reprlib.py,sha256=Re9bk3n-kC__9DxQmRlevqFA86pE6TtVfWjUgpbVOv0,1849
|
63
63
|
utilities/rich.py,sha256=t50MwwVBsoOLxzmeVFSVpjno4OW6Ufum32skXbV8-Bs,1911
|
64
64
|
utilities/scipy.py,sha256=X6ROnHwiUhAmPhM0jkfEh0-Fd9iRvwiqtCQMOLmOQF8,945
|
@@ -87,7 +87,7 @@ utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
|
|
87
87
|
utilities/whenever.py,sha256=iLRP_-8CZtBpHKbGZGu-kjSMg1ZubJ-VSmgSy7Eudxw,17787
|
88
88
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
89
89
|
utilities/zoneinfo.py,sha256=-Xm57PMMwDTYpxJdkiJG13wnbwK--I7XItBh5WVhD-o,1874
|
90
|
-
dycw_utilities-0.112.
|
91
|
-
dycw_utilities-0.112.
|
92
|
-
dycw_utilities-0.112.
|
93
|
-
dycw_utilities-0.112.
|
90
|
+
dycw_utilities-0.112.13.dist-info/METADATA,sha256=ry5WZn_RrS8mPfvF1X5nC6BG2rghvsLdY105g8M70kQ,13005
|
91
|
+
dycw_utilities-0.112.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
92
|
+
dycw_utilities-0.112.13.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
93
|
+
dycw_utilities-0.112.13.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/redis.py
CHANGED
@@ -88,20 +88,24 @@ class RedisHashMapKey(Generic[_K, _V]):
|
|
88
88
|
|
89
89
|
async def delete(self, redis: Redis, key: _K, /) -> int:
|
90
90
|
"""Delete a key from a hashmap in `redis`."""
|
91
|
+
ser = _serialize( # skipif-ci-and-not-linux
|
92
|
+
key, serializer=self.key_serializer
|
93
|
+
).decode()
|
91
94
|
async with timeout_dur( # skipif-ci-and-not-linux
|
92
95
|
duration=self.timeout, error=self.error
|
93
96
|
):
|
94
|
-
return await cast("Awaitable[int]", redis.hdel(self.name,
|
97
|
+
return await cast("Awaitable[int]", redis.hdel(self.name, ser))
|
95
98
|
raise ImpossibleCaseError(case=[f"{redis=}", f"{key=}"]) # pragma: no cover
|
96
99
|
|
97
100
|
async def exists(self, redis: Redis, key: _K, /) -> bool:
|
98
101
|
"""Check if the key exists in a hashmap in `redis`."""
|
102
|
+
ser = _serialize( # skipif-ci-and-not-linux
|
103
|
+
key, serializer=self.key_serializer
|
104
|
+
).decode()
|
99
105
|
async with timeout_dur( # skipif-ci-and-not-linux
|
100
106
|
duration=self.timeout, error=self.error
|
101
107
|
):
|
102
|
-
return await cast(
|
103
|
-
"Awaitable[bool]", redis.hexists(self.name, cast("str", key))
|
104
|
-
)
|
108
|
+
return await cast("Awaitable[bool]", redis.hexists(self.name, ser))
|
105
109
|
|
106
110
|
async def get(self, redis: Redis, key: _K, /) -> _V:
|
107
111
|
"""Get a value from a hashmap in `redis`."""
|
@@ -413,7 +417,7 @@ class RedisKey(Generic[_T]):
|
|
413
417
|
case _ as never:
|
414
418
|
assert_never(never)
|
415
419
|
|
416
|
-
async def get(self, redis: Redis, /) -> _T
|
420
|
+
async def get(self, redis: Redis, /) -> _T:
|
417
421
|
"""Get a value from `redis`."""
|
418
422
|
async with timeout_dur( # skipif-ci-and-not-linux
|
419
423
|
duration=self.timeout, error=self.error
|
File without changes
|
File without changes
|