Running this:
import qcore
counter = 0
class X:
@qcore.caching.cached_per_instance()
def cached(self, **kwargs):
global counter
counter += 1
return counter
x = X()
print(x.cached(a=1))
print(x.cached(a=2))
Prints 1, 1 (we'd expect 1, 2).
This is because the get_args_tuple() function (https://github.com/quora/qcore/blob/master/qcore/caching.py#L321) ignores **kwargs that are not recognized.
I see a few other problems:
- *args isn't handled either
- Python 3.8+ positional-only params are ignored.