Patch attrdict for py310 26/74926/1 stable/yoga
authorCédric Ollivier <cedric.ollivier@orange.com>
Fri, 11 Jul 2025 10:40:38 +0000 (12:40 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Fri, 11 Jul 2025 10:40:38 +0000 (12:40 +0200)
Vmtp depends on attrdict which is unmaintained and outdated.

Change-Id: Ie318b0531e33c62a7c7d0db31591459936a3596b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/benchmarking/Dockerfile
docker/benchmarking/attrdict.patch [new file with mode: 0644]

index 874be69..a35751f 100644 (file)
@@ -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 (file)
index 0000000..d0a303d
--- /dev/null
@@ -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