Update hacking version

1. Use latest release 1.1.0 and compatible changes w.r.t pep8
2. Update json module to jsonutils

Change-Id: I38afd3bfa93b0f378482619880e4df8757d85ef5
This commit is contained in:
jacky06 2019-03-06 22:25:18 +08:00
parent 66e97bd5b6
commit 2bfb9f4f96
3 changed files with 6 additions and 6 deletions

View File

@ -17,9 +17,9 @@
from __future__ import absolute_import
from dogpile.cache import api
import etcd3gw
import json
from oslo_cache import core
from oslo_serialization import jsonutils
__all__ = [
'Etcd3gwCacheBackend'
@ -50,7 +50,7 @@ class Etcd3gwCacheBackend(api.CacheBackend):
values = self._client.get(key, False)
if not values:
return core.NO_VALUE
value, metadata = json.loads(values[0])
value, metadata = jsonutils.loads(values[0])
return api.CachedValue(value, metadata)
def get_multi(self, keys):
@ -65,7 +65,7 @@ class Etcd3gwCacheBackend(api.CacheBackend):
if self.timeout:
lease = self._client.lease(ttl=self.timeout)
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):
self._client.delete(key)

View File

@ -129,8 +129,8 @@ def _build_cache_config(conf):
# directly makes for odd behaviors when wrapping dogpile.cache in
# a library like oslo.cache
if (conf.cache.backend
in ('dogpile.cache.memcached', 'oslo_cache.memcache_pool')
and argname == 'url'):
in ('dogpile.cache.memcached', 'oslo_cache.memcache_pool') and
argname == 'url'):
argvalue = argvalue.split(',')
conf_dict[arg_key] = argvalue

View File

@ -1,7 +1,7 @@
# 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
# 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
oslotest>=3.2.0 # Apache-2.0
pifpaf>=0.10.0 # Apache-2.0