py-cachify 2.1.0__tar.gz → 2.1.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-cachify
3
- Version: 2.1.0
3
+ Version: 2.1.1
4
4
  Summary: Distributed locks, caching, and locking decorators at hand
5
5
  Project-URL: Homepage, https://github.com/EzyGang/py-cachify
6
6
  Project-URL: Repository, https://github.com/EzyGang/py-cachify
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.10
22
22
  Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3.12
24
24
  Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
25
26
  Classifier: Topic :: Software Development
26
27
  Classifier: Topic :: Software Development :: Libraries
27
28
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -74,7 +74,7 @@ def cached(
74
74
 
75
75
  return cast(AsyncResetWrappedF[_P, _R], cast(object, _async_wrapper))
76
76
  else:
77
- _sync_func = cast(Callable[_P, _R], _func)
77
+ _sync_func = _func
78
78
 
79
79
  @wraps(_sync_func)
80
80
  def _sync_wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R:
@@ -83,7 +83,7 @@ def cached(
83
83
  bound_args=signature.bind(*args, **kwargs), key=key, operation_postfix='cached'
84
84
  )
85
85
  if val := cachify.get(key=_key):
86
- return encode_decode_value(encoder_decoder=dec, val=val)
86
+ return cast(_R, encode_decode_value(encoder_decoder=dec, val=val))
87
87
 
88
88
  res = _sync_func(*args, **kwargs)
89
89
  cachify.set(key=_key, val=encode_decode_value(encoder_decoder=enc, val=res), ttl=ttl)
@@ -178,7 +178,7 @@ class lock(AsyncLockMethods, SyncLockMethods):
178
178
 
179
179
  return cast(AsyncLockWrappedF[_P, _R], cast(object, _async_wrapper))
180
180
  else:
181
- _sync_func = cast(Callable[_P, _R], _func)
181
+ _sync_func = _func
182
182
 
183
183
  @wraps(_sync_func)
184
184
  def _sync_wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R:
@@ -287,7 +287,7 @@ def once(key: str, raise_on_locked: bool = False, return_on_locked: Any = None)
287
287
  return cast(AsyncLockWrappedF[_P, _R], cast(object, _async_wrapper))
288
288
 
289
289
  else:
290
- _sync_func = cast(Callable[_P, _R], _func)
290
+ _sync_func = _func
291
291
 
292
292
  @wraps(_sync_func)
293
293
  def _sync_wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R:
@@ -301,7 +301,7 @@ def once(key: str, raise_on_locked: bool = False, return_on_locked: Any = None)
301
301
  if raise_on_locked:
302
302
  raise
303
303
 
304
- return return_on_locked
304
+ return cast(_R, return_on_locked)
305
305
 
306
306
  setattr(_sync_wrapper, 'release', partial(reset, signature=signature, key=key, operation_postfix='once'))
307
307
  setattr(
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "py-cachify"
3
- version = "2.1.0"
3
+ version = "2.1.1"
4
4
  description = "Distributed locks, caching, and locking decorators at hand"
5
5
  authors = [{ name = "Galtozzy", email = "galtozzy+git@gmail.com" }]
6
6
  requires-python = ">=3.8,<4.0"
@@ -25,6 +25,7 @@ classifiers = [
25
25
  "Programming Language :: Python :: 3.11",
26
26
  "Programming Language :: Python :: 3.12",
27
27
  "Programming Language :: Python :: 3.13",
28
+ "Programming Language :: Python :: 3.14",
28
29
  "License :: OSI Approved :: MIT License",
29
30
  ]
30
31
  dependencies = ["typing-extensions>=4.12.2,<5"]
File without changes
File without changes
File without changes