From 4089a85cca1d95b71d98551ff5b4d96b86cfa0a4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 19 May 2024 22:48:51 +0900 Subject: [PATCH] Replace simplejson by built-in json Recent python 3 versions provide the built-in json module which meets the generic requirements. Replace the 3rd party library (simplejson) by the built-in one to reduce external dependencies. Change-Id: Id5eccad660be353843f95acfa691d61888983dab --- osc_placement/http.py | 2 +- osc_placement/tests/functional/base.py | 2 +- osc_placement/tests/unit/test_http.py | 2 +- requirements.txt | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/osc_placement/http.py b/osc_placement/http.py index 7784d11..a5cf686 100644 --- a/osc_placement/http.py +++ b/osc_placement/http.py @@ -11,11 +11,11 @@ # under the License. import contextlib +import json import logging import keystoneauth1.exceptions.http as ks_exceptions import osc_lib.exceptions as exceptions -import simplejson as json from osc_placement import version diff --git a/osc_placement/tests/functional/base.py b/osc_placement/tests/functional/base.py index 27cbaf9..1e2967e 100644 --- a/osc_placement/tests/functional/base.py +++ b/osc_placement/tests/functional/base.py @@ -11,6 +11,7 @@ # under the License. import io +import json import logging import random @@ -20,7 +21,6 @@ from openstackclient import shell from oslotest import base from placement.tests.functional.fixtures import capture from placement.tests.functional.fixtures import placement -import simplejson as json # A list of logger names that will be reset to a log level diff --git a/osc_placement/tests/unit/test_http.py b/osc_placement/tests/unit/test_http.py index e123ee7..1b94e65 100644 --- a/osc_placement/tests/unit/test_http.py +++ b/osc_placement/tests/unit/test_http.py @@ -10,13 +10,13 @@ # License for the specific language governing permissions and limitations # under the License. +import json from unittest import mock import keystoneauth1.exceptions.http as ks_exceptions import osc_lib.exceptions as exceptions import oslotest.base as base import requests -import simplejson as json from osc_placement import http from osc_placement import version diff --git a/requirements.txt b/requirements.txt index 9f29ac0..ef2b703 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ pbr>=2.0.0 # Apache-2.0 keystoneauth1>=3.3.0 # Apache-2.0 -simplejson>=3.16.0 # MIT osc-lib>=1.2.0 # Apache-2.0 oslo.utils>=3.37.0 # Apache-2.0