[PATCH 13 of 16 eac] [py3] Force evaluation of dict's items() before modifying the dict

Denis Laxalde denis.laxalde at logilab.fr
Tue Oct 1 12:36:39 CEST 2019


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1569924620 -7200
#      Tue Oct 01 12:10:20 2019 +0200
# Node ID 0ab9d4761a6736621e1d360bc649c712e5f5ee3b
# Parent  f2d8430ab184e725fed5483e10ce704713f93f4d
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r 0ab9d4761a67
[py3] Force evaluation of dict's items() before modifying the dict

diff --git a/cubicweb_eac/entities.py b/cubicweb_eac/entities.py
index f29822c..f6355cc 100644
--- a/cubicweb_eac/entities.py
+++ b/cubicweb_eac/entities.py
@@ -239,7 +239,7 @@ class AbstractXmlAdapter(EntityAdapter):
         """
         attributes = attributes or {}
         tag = substitute_xml_prefix(tag, self.namespaces)
-        for attr, value in attributes.items():
+        for attr, value in list(attributes.items()):
             newattr = substitute_xml_prefix(attr, self.namespaces)
             attributes[newattr] = value
             if newattr != attr:



More information about the saem-devel mailing list