diff --git a/docker/build_base_image.sh b/docker/build_base_image.sh index 0c37793a..3b112c30 100755 --- a/docker/build_base_image.sh +++ b/docker/build_base_image.sh @@ -3,7 +3,7 @@ set -x # Print each script step. set -eo pipefail # Exit the script if any statement returns error. -REAL_PATH=$(python -c "import os,sys;print(os.path.realpath('$0'))") +REAL_PATH=$(python3 -c "import os,sys;print(os.path.realpath('$0'))") cd "$(dirname "$REAL_PATH")/../docker/" BASE_GIT_COMMIT=$(git rev-parse --verify HEAD) diff --git a/lower-constraints.txt b/lower-constraints.txt index 05a8d414..388819de 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -7,13 +7,13 @@ debtcollector==1.2.0 docutils==0.11 extras==1.0.0 fixtures==3.0.0 -flake8==2.5.5 +flake8==2.6.0 future==0.16.0 gevent==1.2.2 gitdb==0.6.4 GitPython==1.0.1 greenlet==0.4.10 -hacking==0.12.0 +hacking==1.1.0 httplib2==0.9.1 iso8601==0.1.11 kazoo==2.2 diff --git a/monasca_common/rest/utils.py b/monasca_common/rest/utils.py index 13386efc..87888242 100644 --- a/monasca_common/rest/utils.py +++ b/monasca_common/rest/utils.py @@ -12,8 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +import json + import six -import ujson as json from monasca_common.rest import exceptions diff --git a/monasca_common/validation/metrics.py b/monasca_common/validation/metrics.py index e75bc9b4..628823a7 100644 --- a/monasca_common/validation/metrics.py +++ b/monasca_common/validation/metrics.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json import math import re +import sys import six -import sys -import ujson # This is used to ensure that metrics with a timestamp older than # RECENT_POINT_THRESHOLD_DEFAULT seconds (or the value passed in to @@ -108,7 +108,7 @@ def validate_value_meta(value_meta): raise InvalidValueMeta(msg) try: - value_meta_json = ujson.dumps(value_meta) + value_meta_json = json.dumps(value_meta) except Exception: raise InvalidValueMeta("Unable to serialize valueMeta into JSON") if len(value_meta_json) > VALUE_META_VALUE_MAX_LENGTH: diff --git a/requirements.txt b/requirements.txt index 6808390e..7e7ba7b2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,5 +8,4 @@ oslo.config>=5.2.0 # Apache-2.0 oslo.policy>=1.30.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 pyparsing>=2.1.0 # MIT -ujson>=1.35 # BSD confluent-kafka>=0.11.4 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index a74545d1..d739bf3f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. # Hacking already pins down pep8, pyflakes and flake8 -bandit!=1.6.0,>=1.1.0 # Apache-2.0 +bandit!=1.6.0,>=1.1.0,<=1.6.2 hacking>=1.1.0,<1.2.0 # Apache-2.0 Babel!=2.4.0,>=2.3.4 # BSD coverage!=4.4,>=4.0 # Apache-2.0