[issue39538] SystemError when set Element.attrib to non-dict

2020-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed by issue39822. e.attrib = 1 now raises a TypeError. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed versions: -Python 2.7, Python 3.7, Python 3.8 ___ Python tracker

[issue39538] SystemError when set Element.attrib to non-dict

2020-02-05 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that SystemError is the wrong response. Whether it needs to be AttributeError – probably fine to consider this an implementation detail. TypeError also seems ok in at least some of the cases. I think we should widen the code to expect some kind of Mapp

[issue39538] SystemError when set Element.attrib to non-dict

2020-02-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The C implementation raises a SystemError after setting Element.attrib to non-dict. >>> from xml.etree import ElementTree as ET >>> e = ET.Element('a') >>> e.attrib = 1 >>> e.get('x') Traceback (most recent call last): File "", line 1, in SystemError: