MemcachedCache backend get_many does not work on Python 3
These two test failures are fixed with the attached patch. Should this be backported to 1.5.x?
======================================================================
ERROR: test_cache_versioning_get_set_many (cache.tests.MemcachedCacheTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/tests/cache/tests.py", line 685, in test_cache_versioning_get_set_many
self.assertEqual(self.cache.get_many(['ford1','arthur1']),
File "/home/tim/code/django/django/core/cache/backends/memcached.py", line 95, in get_many
_[m[k]] = v
KeyError: ':1:arthur1'
======================================================================
ERROR: test_get_many (cache.tests.MemcachedCacheTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/tests/cache/tests.py", line 234, in test_get_many
self.assertEqual(self.cache.get_many(['a', 'c', 'd']), {'a' : 'a', 'c' : 'c', 'd' : 'd'})
File "/home/tim/code/django/django/core/cache/backends/memcached.py", line 95, in get_many
_[m[k]] = v
KeyError: ':1:a'
I'd rather replace
list(map(lambda ...)))
with a list comprehension.Otherwise, yes, please commit and backport.