Skip to content

Commit 774453e

Browse files
authored
Merge pull request #197 from yan12125/fix-msgpack-compatibility
Make v4 cache compatible with msgpack 1.0 in the future
2 parents c9db69c + 89f1bfb commit 774453e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cachecontrol/serialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def _loads_v3(self, request, data):
181181

182182
def _loads_v4(self, request, data):
183183
try:
184-
cached = msgpack.loads(data, encoding="utf-8")
184+
cached = msgpack.loads(data, raw=False)
185185
except ValueError:
186186
return
187187

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
include_package_data=True,
1818
description="httplib2 caching for requests",
1919
long_description=long_description,
20-
install_requires=["requests", "msgpack"],
20+
install_requires=["requests", "msgpack>=0.5.2"],
2121
extras_require={"filecache": ["lockfile>=0.9"], "redis": ["redis>=2.10.5"]},
2222
entry_points={"console_scripts": ["doesitcache = cachecontrol._cmd:main"]},
2323
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",

0 commit comments

Comments
 (0)