[issue41900] XML C14N serialisation fails with default namespace
Stefan Behnel
report at bugs.python.org
Thu Oct 1 04:09:31 EDT 2020
New submission from Stefan Behnel <stefan_ml at behnel.de>:
import xml.etree.ElementTree as ET
xml="""
<X xmlns="http://soap.sforce.com/2006/04/metadata">
<Y targets="lightning__AppPage,lightning__HomePage"></Y>
</X>"""
print(ET.canonicalize(xml))
Fails with:
ValueError: Namespace "" is not declared in scope
when trying to build the QName of the unnamespaced "targets" attribute.
Originally reported for lxml here:
https://bugs.launchpad.net/lxml/+bug/1869455
----------
components: XML
messages: 377743
nosy: scoder
priority: normal
severity: normal
stage: needs patch
status: open
title: XML C14N serialisation fails with default namespace
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41900>
_______________________________________
More information about the Python-bugs-list
mailing list