py-cachify 2.0.7__tar.gz → 2.0.9__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.
- {py_cachify-2.0.7 → py_cachify-2.0.9}/PKG-INFO +2 -2
- {py_cachify-2.0.7 → py_cachify-2.0.9}/README.md +1 -1
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_helpers.py +6 -3
- {py_cachify-2.0.7 → py_cachify-2.0.9}/pyproject.toml +1 -1
- {py_cachify-2.0.7 → py_cachify-2.0.9}/LICENSE +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/__init__.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/__init__.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_cached.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_clients.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_exceptions.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_lib.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_lock.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_types/__init__.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_types/_common.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_types/_lock_wrap.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/_backend/_types/_reset_wrap.py +0 -0
- {py_cachify-2.0.7 → py_cachify-2.0.9}/py_cachify/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: py-cachify
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.9
|
|
4
4
|
Summary: Distributed locks, caching, and locking decorators at hand
|
|
5
5
|
Home-page: https://github.com/EzyGang/py-cachify
|
|
6
6
|
License: MIT
|
|
@@ -71,7 +71,7 @@ Description-Content-Type: text/markdown
|
|
|
71
71
|
|
|
72
72
|
**Source Code**: <a href="https://github.com/EzyGang/py-cachify" target="_blank">https://github.com/EzyGang/py-cachify</a>
|
|
73
73
|
|
|
74
|
-
**FastAPI Integration Guide**: <a href="https://
|
|
74
|
+
**FastAPI Integration Guide**: <a href="https://github.com/EzyGang/py-cachify-fastapi-demo" target="_blank">Repo</a>
|
|
75
75
|
|
|
76
76
|
---
|
|
77
77
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
**Source Code**: <a href="https://github.com/EzyGang/py-cachify" target="_blank">https://github.com/EzyGang/py-cachify</a>
|
|
41
41
|
|
|
42
|
-
**FastAPI Integration Guide**: <a href="https://
|
|
42
|
+
**FastAPI Integration Guide**: <a href="https://github.com/EzyGang/py-cachify-fastapi-demo" target="_blank">Repo</a>
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
@@ -14,15 +14,18 @@ _S = TypeVar('_S')
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def get_full_key_from_signature(bound_args: inspect.BoundArguments, key: str) -> str:
|
|
17
|
+
bound_args.apply_defaults()
|
|
18
|
+
_args_repr = f'{bound_args}'
|
|
19
|
+
|
|
17
20
|
args_dict = bound_args.arguments
|
|
18
|
-
args: Tuple[
|
|
21
|
+
args: Tuple[Any, ...] = args_dict.pop('args', ())
|
|
19
22
|
kwargs: Dict[str, Any] = args_dict.pop('kwargs', {})
|
|
20
23
|
kwargs.update(args_dict)
|
|
21
24
|
|
|
22
25
|
try:
|
|
23
26
|
return key.format(*args, **kwargs)
|
|
24
|
-
except IndexError:
|
|
25
|
-
raise ValueError('Arguments in a key do not match function signature') from None
|
|
27
|
+
except (IndexError, KeyError):
|
|
28
|
+
raise ValueError(f'Arguments in a key({key}) do not match function signature params({_args_repr})') from None
|
|
26
29
|
|
|
27
30
|
|
|
28
31
|
def is_coroutine(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|