put_bytes should raise a specific exception when given unicode

Bug #106898 reported by Andrew Bennetts on 2007-04-16
Affects Status Importance Assigned to Milestone
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_bytes_unicode in test_transport_implementations).

Related branches

Martin Pool (mbp) wrote :

TypeError would be ok.

Changed in bzr:
status: New → Incomplete
Samuel Bronson (naesten) wrote :

Why is this incomplete?

Martin Pool (mbp) wrote :

It was probably incomplete because of a Launchpad midair collision or something.

Changed in bzr:
status: Incomplete → Confirmed
importance: Undecided → Low
Vincent Ladeuil (vila) on 2016-01-21
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila) on 2016-01-21
Changed in bzr:
milestone: none → 2.7b1
Vincent Ladeuil (vila) on 2016-01-22
Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers