Merge "Update hacking version"
This commit is contained in:
commit
5e55865245
@ -17,9 +17,9 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from dogpile.cache import api
|
from dogpile.cache import api
|
||||||
import etcd3gw
|
import etcd3gw
|
||||||
import json
|
|
||||||
|
|
||||||
from oslo_cache import core
|
from oslo_cache import core
|
||||||
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'Etcd3gwCacheBackend'
|
'Etcd3gwCacheBackend'
|
||||||
@ -50,7 +50,7 @@ class Etcd3gwCacheBackend(api.CacheBackend):
|
|||||||
values = self._client.get(key, False)
|
values = self._client.get(key, False)
|
||||||
if not values:
|
if not values:
|
||||||
return core.NO_VALUE
|
return core.NO_VALUE
|
||||||
value, metadata = json.loads(values[0])
|
value, metadata = jsonutils.loads(values[0])
|
||||||
return api.CachedValue(value, metadata)
|
return api.CachedValue(value, metadata)
|
||||||
|
|
||||||
def get_multi(self, keys):
|
def get_multi(self, keys):
|
||||||
@ -65,7 +65,7 @@ class Etcd3gwCacheBackend(api.CacheBackend):
|
|||||||
if self.timeout:
|
if self.timeout:
|
||||||
lease = self._client.lease(ttl=self.timeout)
|
lease = self._client.lease(ttl=self.timeout)
|
||||||
for key, value in mapping.items():
|
for key, value in mapping.items():
|
||||||
self._client.put(key, json.dumps(value), lease)
|
self._client.put(key, jsonutils.dumps(value), lease)
|
||||||
|
|
||||||
def delete(self, key):
|
def delete(self, key):
|
||||||
self._client.delete(key)
|
self._client.delete(key)
|
||||||
|
@ -129,8 +129,8 @@ def _build_cache_config(conf):
|
|||||||
# directly makes for odd behaviors when wrapping dogpile.cache in
|
# directly makes for odd behaviors when wrapping dogpile.cache in
|
||||||
# a library like oslo.cache
|
# a library like oslo.cache
|
||||||
if (conf.cache.backend
|
if (conf.cache.backend
|
||||||
in ('dogpile.cache.memcached', 'oslo_cache.memcache_pool')
|
in ('dogpile.cache.memcached', 'oslo_cache.memcache_pool') and
|
||||||
and argname == 'url'):
|
argname == 'url'):
|
||||||
argvalue = argvalue.split(',')
|
argvalue = argvalue.split(',')
|
||||||
conf_dict[arg_key] = argvalue
|
conf_dict[arg_key] = argvalue
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# The order of packages is significant, because pip processes them in the order
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
pifpaf>=0.10.0 # Apache-2.0
|
pifpaf>=0.10.0 # Apache-2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user