This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients gregory.p.smith
Date 2013-10-04.00:57:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1380848221.34.0.113318109219.issue19159@psf.upfronthosting.co.za>
In-reply-to
Content
From a conversion through 2to3:

<       default_value=unicode("", "utf-8"),
---
>       default_value=str("", "utf-8"),

The Python 2 unicode constructor takes an optional second parameter which is the codec to use to convert when the first parameter is non-unicode.

2to3 should check the parameters on uses of unicode() and if there is a second parameter and the first is explicitly b"" bytes it should turn it into
  default_value=b"whatever".decode(second_param)

if the first is valid utf-8 and the second is "utf-8" (or its other spellings) it should leave it as is and simply become:
  default_value="thing passed to unicode() that was already utf-8"
History
Date User Action Args
2013-10-04 00:57:01gregory.p.smithsetrecipients: + gregory.p.smith
2013-10-04 00:57:01gregory.p.smithsetmessageid: <1380848221.34.0.113318109219.issue19159@psf.upfronthosting.co.za>
2013-10-04 00:57:01gregory.p.smithlinkissue19159 messages
2013-10-04 00:57:00gregory.p.smithcreate