flask-caching cannot use as a decorator for async function
The following works:
@jira_api.route('/bugs/sync') @mycache.cached(timeout=50, key_prefix='sync') def show_bug_sync(): return {'message': 1}
The following does not work: @jira_api.route('/bugs/sync') @mycache.cached(timeout=50, key_prefix='sync') async def show_bug_sync(): return {'message': 1}
And get the error: ( I omit the actual path to the flask-caching package in my virtual env)
File ".....\flask_caching_init_.py", line 479, in decorated_function self.cache.set( File ".....\flask_caching\backends\simplecache.py", line 101, in set item = (expires, pickle.dumps(value, pickle.HIGHEST_PROTOCOL))Open an interactive python shell in this frame TypeError: cannot pickle 'coroutine' object
#282
@northernSage this fix has been merged. Any idea when this can be released to pypi?
@benney-au-le Currently trying to get in touch with previous maintainer since I don't have pypi credentials. @sh4nks, are you there? 😢
@northernSage I am still around :-)
Not sure if I have time this evening but I am sure I can transfer them to you or to the org in the next couple of days! If I forget please ping me again
@sh4nks Awesome, whatever is easier for you. My usernames:
- pipy: gfvante
- readthedocs: northernSage
@sh4nks pinging you again as per request. Also, I really want to make our next release :bowtie:
@northernSage Added you to the PyPI project and to the readthedocs project! :-)
@sh4nks awesome, thanks!