Monkey patching private escaping functions breaks with ElementTree 1.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Martin Packman |
Bug Description
On Python 2.7 the following tests fail:
bt.
bt.
bt.
bt.
bt.
All the assertions involve expecting non-ascii characters, but getting xml escapes instead, like:
Traceback (most recent call last):
File ".\bzrlib\
AssertionError: not equal:
a = {'alpha': u'\u03b1', 'branch-nick': 'tree', 'omega': u'\u03a9'}
b = {'alpha': 'α', 'branch-nick': 'tree', 'omega': 'Ω'}
The specific upstream change that affected this was the update to ElementTree 1.3 so anyone installing that separately will also run into this:
<http://
The fault however is in bzrlib.
# performance tuning for elementree's serialiser. This should be
# sent upstream - RBC 20060523.
# the functions here are patched into elementtree at runtime.
Is this optimisation still important, or does it only matter for old formats? Either the monkey-patching should be made conditional on ElementTree version, or updated, or just ripped out.
Related branches
- John A Meinel: Approve
-
Diff: 85 lines (+2/-67)1 file modifiedbzrlib/xml_serializer.py (+2/-67)
Changed in bzr: | |
importance: | Undecided → High |
status: | New → Confirmed |
tags: |
added: python27 removed: python2.7 |
In the end ripping out the monkey patching was okay as there's a newer escaping function in bzrlib.xml8 anyway.