put_bytes should raise a specific exception when given unicode
Bug #106898 reported by
Andrew Bennetts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Vincent Ladeuil |
Bug Description
At the moment, transport.put_bytes raises either AssertionError or UnicodeEncodeError when given unicode strings rather than bytes. We should choose a more appropriate error (perhaps TypeError? Or define a new one?), and fix all the transports to raise it rather anything else in this case. (see test_put_
Related branches
lp:~vila/bzr/106898-put-bytes-raises-TypeError
- Richard Wilbur: Needs Fixing
-
Diff: 289 lines (+51/-73)9 files modifiedbzrlib/tests/per_transport.py (+2/-23)
bzrlib/tests/test_smart_transport.py (+1/-1)
bzrlib/transport/__init__.py (+14/-14)
bzrlib/transport/local.py (+7/-5)
bzrlib/transport/memory.py (+4/-10)
bzrlib/transport/readonly.py (+1/-1)
bzrlib/transport/remote.py (+11/-16)
bzrlib/transport/sftp.py (+7/-3)
doc/en/release-notes/bzr-2.7.txt (+4/-0)
Changed in bzr: | |
assignee: | nobody → Vincent Ladeuil (vila) |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.7b1 |
Changed in bzr: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
TypeError would be ok.