From 924a493c00b6ed1da04ce8c31f130c3fe45ac753 Mon Sep 17 00:00:00 2001 From: Eric Ball Date: Tue, 29 Oct 2019 12:43:10 -0700 Subject: [PATCH] Use "upgrade-strategy eager" for pip install Pip changed its default upgrade-strategy to "only-if-required", which is not correctly upgrading requests (and potentially other packages in the future) to meet other packages' requirements. This results in errors in the build log. By using the upgrade-strategy "eager", pip is able to properly install what is needed. Issue: RELENG-2074 Change-Id: I0e37aac57553a352a4c0797d0ef8d0b597072440 Signed-off-by: Eric Ball --- releasenotes/notes/python-dep-resolution-8122bc59b6ac886c.yaml | 9 +++++++++ shell/python-tools-install.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/python-dep-resolution-8122bc59b6ac886c.yaml diff --git a/releasenotes/notes/python-dep-resolution-8122bc59b6ac886c.yaml b/releasenotes/notes/python-dep-resolution-8122bc59b6ac886c.yaml new file mode 100644 index 00000000..cec7151e --- /dev/null +++ b/releasenotes/notes/python-dep-resolution-8122bc59b6ac886c.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + Change pip's upgrade-strategy to "eager" for python-tools-install.sh. + Pip changed its default upgrade-strategy to "only-if-required", which + is not correctly upgrading requests (and potentially other packages + in the future) to meet other packages' requirements. This results in + errors in the build log. By using the upgrade-strategy "eager", pip + is able to properly install what is needed. diff --git a/shell/python-tools-install.sh b/shell/python-tools-install.sh index 1f5beec0..660d5f26 100644 --- a/shell/python-tools-install.sh +++ b/shell/python-tools-install.sh @@ -56,6 +56,6 @@ EOF python3 -m venv ~/.local python3 -m pip install --user --quiet --upgrade pip python3 -m pip install --user --quiet --upgrade setuptools - python3 -m pip install --user --quiet --upgrade -r "$requirements_file" + python3 -m pip install --user --quiet --upgrade --upgrade-strategy eager -r "$requirements_file" rm -rf "$requirements_file" fi -- 2.16.6