Skip to content

Commit c9cf4d9

Browse files
authored
sonic-slave-buster pins the versions of Jinja2 and MarkupSafe in py3 (#10043)
#### Why I did it Upstream breaking change, ref discussion pallets/markupsafe#282
1 parent b101b02 commit c9cf4d9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.azure-pipelines/azure-pipelines-image-template.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
[ -n "$SYSTEM_PULLREQUEST_PULLREQUESTID" ] && BRANCH_NAME="$SYSTEM_PULLREQUEST_TARGETBRANCH-$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
4444
git checkout -b $BRANCH_NAME
4545
sudo modprobe overlay
46-
pip3 install MarkupSafe==2.0.1 --force-reinstall
4746
sudo apt-get install -y acl
4847
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
4948
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure

sonic-slave-buster/Dockerfile.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@ RUN pip3 uninstall -y enum34
465465
466466
# For templating
467467
RUN pip2 install j2cli==0.3.10
468+
# Note: Jinja2 depends on MarkupSafe, however markupsafe 2.1.0 breaks Jinja2 2.10
469+
# Debian buster dist-packages include python3-markupsafe (1.1.0-1) and python3-jinja2 (2.10-2)
470+
# If not pinning the versions, any requirement like `MarkupSafe>=2.0` will pull latest into site-packages and mess up.
471+
RUN pip3 install MarkupSafe==2.0.1
472+
RUN pip3 install Jinja2==3.0.3
468473
469474
# For sonic-mgmt-framework
470475
RUN pip2 install "PyYAML==5.4.1"

0 commit comments

Comments
 (0)