From d5287d497a33a3c63cfeb99112a5a28521802fe9 Mon Sep 17 00:00:00 2001 From: Oleksandr Ivantsiv Date: Thu, 23 May 2024 10:53:51 -0700 Subject: [PATCH] [build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages (#3328) * [build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages * [pipeline] Pin request package to v2.31.0 --- azure-pipelines.yml | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dec731eea4..bd7eee7be6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,6 +46,13 @@ stages: image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:$(BUILD_BRANCH) steps: + - script: | + set -ex + sudo apt-get update + sudo apt-get install -y python3-pip + sudo pip3 install requests==2.31.0 + displayName: "Install dependencies" + - script: | sourceBranch=$(Build.SourceBranchName) if [[ "$(Build.Reason)" == "PullRequest" ]];then diff --git a/setup.py b/setup.py index a989acb876..6a66f012f9 100644 --- a/setup.py +++ b/setup.py @@ -250,7 +250,7 @@ 'semantic-version>=2.8.5', 'prettyprinter>=0.18.0', 'pyroute2>=0.5.14, <0.6.1', - 'requests>=2.25.0', + 'requests>=2.25.0, <=2.31.0', 'tabulate==0.9.0', 'toposort==1.6', 'www-authenticate==0.9.2',