Use experimental cachew Exceptions

This commit is contained in:
Dima Gerasimov 2020-01-08 22:07:34 +00:00
parent a57be019d0
commit 012249ceca
2 changed files with 16 additions and 5 deletions

View file

@ -125,4 +125,6 @@ def mcachew(*args, **kwargs):
warnings.warn('cachew library not found. You might want to install it to speed things up. See https://github.com/karlicoss/cachew')
return lambda orig_func: orig_func
else:
import cachew.experimental
cachew.experimental.enable_exceptions() # TODO do it only once?
return cachew.cachew(*args, **kwargs)