From: Cédric Ollivier Date: Fri, 11 Jul 2025 10:40:38 +0000 (+0200) Subject: Patch attrdict for py310 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=b1c725e6ec73588ca26eb6bc05744b6565c51c5a;p=functest.git Patch attrdict for py310 Vmtp depends on attrdict which is unmaintained and outdated. Change-Id: Ie318b0531e33c62a7c7d0db31591459936a3596b Signed-off-by: Cédric Ollivier --- diff --git a/docker/benchmarking/Dockerfile b/docker/benchmarking/Dockerfile index 874be6934..a35751fec 100644 --- a/docker/benchmarking/Dockerfile +++ b/docker/benchmarking/Dockerfile @@ -3,6 +3,7 @@ FROM opnfv/functest-core:yoga ARG VMTP_TAG=34a82c9f3598ec7f5d8de0a6d5139b92931db4cc ARG NEUTRON_TAG=unmaintained/zed +COPY attrdict.patch /tmp/attrdict.patch RUN apk --no-cache add --update libxml2 libxslt && \ apk --no-cache add --virtual .build-deps --update \ python3-dev build-base linux-headers libffi-dev \ @@ -24,7 +25,9 @@ RUN apk --no-cache add --update libxml2 libxslt && \ git fetch --tags https://opendev.org/openstack/neutron.git $NEUTRON_TAG && \ git checkout FETCH_HEAD) && \ cp /src/neutron/rally-jobs/task-neutron.yaml /home/opnfv/functest/data/rally/neutron/rally-jobs/ && \ - rm -r /src/vmtp /src/neutron && \ + (cd /usr/lib/python3.10/site-packages/attrdict && \ + patch -p2 < /tmp/attrdict.patch) && \ + rm -r /src/vmtp /src/neutron /tmp/attrdict.patch && \ apk del .build-deps COPY testcases.yaml /etc/xtesting/testcases.yaml CMD ["run_tests", "-t", "all"] diff --git a/docker/benchmarking/attrdict.patch b/docker/benchmarking/attrdict.patch new file mode 100644 index 000000000..d0a303d62 --- /dev/null +++ b/docker/benchmarking/attrdict.patch @@ -0,0 +1,52 @@ +diff --git a/attrdict/default.py b/attrdict/default.py +index a5e5bcb..692f117 100644 +--- a/attrdict/default.py ++++ b/attrdict/default.py +@@ -1,7 +1,7 @@ + """ + A subclass of MutableAttr that has defaultdict support. + """ +-from collections import Mapping ++from collections.abc import Mapping + + import six + +diff --git a/attrdict/mapping.py b/attrdict/mapping.py +index 02ebac8..560e4ab 100644 +--- a/attrdict/mapping.py ++++ b/attrdict/mapping.py +@@ -1,7 +1,7 @@ + """ + An implementation of MutableAttr. + """ +-from collections import Mapping ++from collections.abc import Mapping + + import six + +diff --git a/attrdict/merge.py b/attrdict/merge.py +index 229596c..f5ecf38 100644 +--- a/attrdict/merge.py ++++ b/attrdict/merge.py +@@ -1,7 +1,7 @@ + """ + A right-favoring Mapping merge. + """ +-from collections import Mapping ++from collections.abc import Mapping + + + __all__ = ['merge'] +diff --git a/attrdict/mixins.py b/attrdict/mixins.py +index cbe869f..1265e20 100644 +--- a/attrdict/mixins.py ++++ b/attrdict/mixins.py +@@ -2,7 +2,7 @@ + Mixin Classes for Attr-support. + """ + from abc import ABCMeta, abstractmethod +-from collections import Mapping, MutableMapping, Sequence ++from collections.abc import Mapping, MutableMapping, Sequence + import re + + import six