[BUG] cElementTree can't handle attributes with tabs
John Arbash Meinel
john at arbash-meinel.com
Sun Jul 2 04:32:23 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It seems that cElementTree converts attributes with tabs into plain
spaces. At least as of cElementTree-1.0.5_20051216-py2.4
I was trying to test bundles with a tab character in files, and it seems
that right now, bzr can't handle those files.
>>> e = cElementTree.Element('foo')
>>> cElementTree.tostring(e)
'<foo />'
>>> e.set('name', 'foo\tbar')
>>> cElementTree.tostring(e)
'<foo name="foo\tbar" />'
So far so good, the writer is working
>>> f = cElementTree.fromstring(cElementTree.tostring(e))
>>> f.items()
[('name', 'foo bar')]
>>> f.get('name')
'foo bar'
This seems like a pretty serious bug in cElementTree, can people try it
with their version, and see if it occurs there as well?
Thanks,
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEpz5HJdeBCYSNAAMRAnApAJwPcgL8CNnD3gLXKFt1VUKiqazhqwCfQ+Y9
to0JL6RBATUELWbJrivOKJ0=
=ObAQ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list