diff --git a/.gitreview b/.gitreview index 4eee726db..729164a2f 100644 --- a/.gitreview +++ b/.gitreview @@ -2,3 +2,4 @@ host=review.opendev.org port=29418 project=openstack/python-openstackclient.git +defaultbranch=unmaintained/2024.1 diff --git a/openstackclient/api/api.py b/openstackclient/api/api.py index f02c87dcc..7c8fb859f 100644 --- a/openstackclient/api/api.py +++ b/openstackclient/api/api.py @@ -12,11 +12,10 @@ # """Base API Library""" - from keystoneauth1 import exceptions as ks_exceptions from keystoneauth1 import session as ks_session from osc_lib import exceptions -import simplejson as json +import requests from openstackclient.i18n import _ @@ -118,7 +117,7 @@ def create(self, url, session=None, method=None, **params): # Should this move into _requests()? try: return ret.json() - except json.JSONDecodeError: + except requests.JSONDecodeError: return ret def delete(self, url, session=None, **params): @@ -169,7 +168,7 @@ def list(self, path, session=None, body=None, detailed=False, **params): ) try: return ret.json() - except json.JSONDecodeError: + except requests.JSONDecodeError: return ret # Layered actions built on top of the basic action methods do not diff --git a/requirements.txt b/requirements.txt index a1b87a042..0cc6c7e88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,4 +13,5 @@ oslo.i18n>=3.15.3 # Apache-2.0 python-keystoneclient>=3.22.0 # Apache-2.0 python-novaclient>=18.1.0 # Apache-2.0 python-cinderclient>=3.3.0 # Apache-2.0 +requests>=2.14.2 # Apache-2.0 stevedore>=2.0.1 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 0cfed1712..446bfb725 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ setenv = OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2024.1} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = @@ -80,7 +80,7 @@ commands = [testenv:venv] deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2024.1} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = @@ -104,7 +104,7 @@ commands = [testenv:docs] deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2024.1} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html @@ -114,7 +114,7 @@ commands = [testenv:releasenotes] deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2024.1} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html