JohnCardinal / crunchy

Automatically exported from code.google.com/p/crunchy
0 stars 0 forks source link

security module not working properly under Python 3.0 #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Load a W3C strictly compliant file (that can be parsed by the XMLParser
from ElementTree) when using Crunchy under Python 3.0.  If the file
contains unwanted attributes, an exception is raised like:
  File "/Users/andre/CrunchySVN/branches/andre/src/security.py", line 339,
in remove_unwanted
    for attr in element.attrib.items():
RuntimeError: dictionary changed size during iteration

This is because the new ElementTree uses a dict instead of a list to store
the tree architecture.  

An example of this can be seen by attempting to load the "old" official
Python tutorial.

Original issue reported on code.google.com by andre.ro...@gmail.com on 12 Jan 2008 at 4:11

GoogleCodeExporter commented 9 years ago
Fixed in revision 555.  Actually, the cause was different than what I thought; 
it's a
change in the behaviour of some_dict.items() (PEP 3106) that was solved by 
enclosing
it in a list. 

Original comment by andre.ro...@gmail.com on 12 Jan 2008 at 4:23

GoogleCodeExporter commented 9 years ago
Did not set the issue to fix as the function __cleanup() is bypassed when using
Python 3.0.  

Original comment by andre.ro...@gmail.com on 12 Jan 2008 at 4:32

GoogleCodeExporter commented 9 years ago
I've stopped trying to make Crunchy run under Python 3.0 for now.  I will wait 
until
the final 3.0 version is released.  This issue can thus be considered invalid 
for now.

Original comment by andre.ro...@gmail.com on 1 Mar 2008 at 2:49