[PATCH eac] [py3] wrap attributes.items() in list() to iterate over static list of items instead of dynamic view

Carine Dengler carine.dengler at logilab.fr
Tue Oct 29 18:18:53 CET 2019


# HG changeset patch
# User Carine Dengler <carine.dengler at logilab.fr>
# Date 1572357988 -3600
#      Tue Oct 29 15:06:28 2019 +0100
# Node ID d436f7f694981c1d9b0c94bc6c29067ed28214e0
# Parent  b0dfa3d306977f6f34feeb0d6049c7f69be54b7f
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r d436f7f69498
[py3] wrap attributes.items() in list() to iterate over static list of items instead of dynamic view

diff -r b0dfa3d30697 -r d436f7f69498 cubicweb_eac/entities.py
--- a/cubicweb_eac/entities.py	Mon Sep 30 17:59:15 2019 +0200
+++ b/cubicweb_eac/entities.py	Tue Oct 29 15:06:28 2019 +0100
@@ -353,7 +353,7 @@
         """
         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