The API cache is not operable between Python versions. I do basically this:
>>> import pickle >>> with open('tests/apicache/735234d1f97ef2e764af8a361be182b3ead3e90b05e56910e9ead87453140d37', 'rb') as f: ... c = f.read() ... >>> pickle.loads(c)
And in Python 2 this works and returns something usable while in Python 3 you only get:
Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'ascii' codec can't decode byte 0xdf in position 1: ordinal not in range(128)
Now this is not much of a problem usually if people stick to their version but considering that pickle shouldn't be trusted with external data I'm wondering if we should cache requests differently. For example in a json files we could utilize that we expect json data itself so we could wrap that data in json itself.