Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Commit 0b99e5e

Browse files
committed
Unpin pip version, change requests requirement
pip version was pinned to 20.2.4 but the commit log doesn't specify a reason. We recently had some issues with tox unable to install dci-control-server from local copy with python 3.9. Removing the pin allows the environment to install. Update requests requirement to >=2.27 where JSONDecodeError has been introduced. Newer pip version installs 2.22 required by dci-control-server. Change `requests.models.JSONDecodeError` to the correct `requests.exceptions.JSONDecodeError` Change-Id: I22164b5e98ac4ea371ae8922277912bc67531333 Depends-On: https://softwarefactory-project.io/r/c/dci-control-server/+/34324
1 parent 7ac8a92 commit 0b99e5e

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

dciclient/diff_jobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def main(argv=sys.argv, environ=os.environ):
169169

170170
try:
171171
response = run(context, args)
172-
except requests.models.JSONDecodeError:
172+
except requests.exceptions.JSONDecodeError:
173173
sys.stderr.write("Invalid parameters.\n")
174174
return 1
175175
except Exception as ex:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
PrettyTable>=0.7.2, <0.8
2-
requests>=2.6.0, <3.0
2+
requests>=2.27.0, <3.0
33
dciauth>= 2.1.7

tests/shell_commands/test_job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def test_diff_jobs(runner, job_id):
234234

235235

236236
def test_diff_jobs_invalid_parameter(runner, job_id):
237-
with pytest.raises(requests.models.JSONDecodeError):
237+
with pytest.raises(requests.exceptions.JSONDecodeError):
238238
runner.invoke_diff_jobs(["--job_id_1", "toto"])
239239

240240

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ usedevelop = True
77
deps = -r{toxinidir}/requirements.txt
88
-r{toxinidir}/test-requirements.txt
99
install_command = pip install -U {packages}
10-
setenv =
11-
VIRTUALENV_PIP = 20.2.4
1210
passenv= *
1311
whitelist_externals =
1412
sh

0 commit comments

Comments
 (0)