1. Michael Bayer
  2. dogpile.cache
  3. Pull requests

Pull requests

#30 Merged
Repository
zzzeek
Branch
master

use pickle.HIGHEST_PROTOCOL on file backend too

Author
  1. anentropic
Reviewers
Description

The memory and redis backends already use pickle.HIGHEST_PROTOCOL but the file backend doesn't

This makes some objects uncacheable with file backend, due to being unpickleable, whereas with HIGHEST_PROTOCOL they can succeed (in my case it was a lxml.etree.XMLParser object).

I wondered if it was a deliberate choice due to dbm backend maybe not handling binary properly? I did some quick checks with anydbm and my pickled lxml parser and it seemed fine. All the tests in this project pass too.

Comments (2)