1. Mike Bayer
  2. dogpile.cache


Jimmy Mabey  committed f8108da

Use compat.u() instead of u"" in RedisBackend

This fixes RedisBackend for Python 3.0 to 3.2, which don't support the
u"" syntax.

  • Participants
  • Parent commits d3c7df5
  • Branches master

Comments (0)

Files changed (1)

File dogpile/cache/backends/redis.py

View file
  • Ignore whitespace
 from __future__ import absolute_import
 from dogpile.cache.api import CacheBackend, NO_VALUE
-from dogpile.cache.compat import pickle
+from dogpile.cache.compat import pickle, u
 redis = None
     def get_mutex(self, key):
         if self.distributed_lock:
-            return self.client.lock(u"_lock{}".format(key), self.lock_timeout,
+            return self.client.lock(u('_lock{}').format(key), self.lock_timeout,
             return None