classification
Title: PEP 349: allow str() to return unicode
Type: feature request Stage: test needed
Components: Unicode Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, alexandre.vassalotti, ezio.melotti, haypo, nascheme (5)
Priority: normal Keywords patch

Created on 2005-08-22 20:54 by nascheme, last changed 2009-05-03 23:48 by haypo.

Files
File name Uploaded Description Edit Remove
str-return-unicode.diff nascheme, 2005-08-22 20:55
Messages (6)
msg48664 - (view) Author: Neil Schemenauer (nascheme) Date: 2005-08-22 20:54
The patch implements PEP 349: "Allow str() to return
unicode strings".  The backwards compatibility problems
appear to be rare.  Hopefully more people can test
their applications.  I'm not very happy with the new
function named PyString_New since it really belongs in
Python/object.c, not stringobject.c.  However, I can't
think of a better name.  I think it should be made
available to extension modules somehow so _PyObject_Str
is no good.
msg48665 - (view) Author: Neil Schemenauer (nascheme) Date: 2005-08-22 20:55
Logged In: YES 
user_id=35752

Attaching patch (forgot to click on stupid checkbox).
msg58292 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) Date: 2007-12-08 05:14
The PEP has been deferred and the patch is out of date.  So, is this
change still wanted?
msg58298 - (view) Author: Neil Schemenauer (nascheme) Date: 2007-12-08 16:59
On Sat, Dec 08, 2007 at 05:14:45AM -0000, Alexandre Vassalotti wrote:
> The PEP has been deferred and the patch is out of date.  So, is this
> change still wanted?

I still think it would make things easier for people using Unicode
with Python 2.x.  However, there does not seem to be much community
interest in the change.

  Neil
msg86707 - (view) Author: Daniel Diniz (ajaksu2) Date: 2009-04-27 22:52
Maybe something useful for 2.7?
msg87085 - (view) Author: STINNER Victor (haypo) Date: 2009-05-03 23:48
PEP 349 was rejected because it breaks backward compatibility, eg. it 
breaks the assomption that str(u"x") converts unicode to byte string.

Python3 is the only good fix for all byte/character Python2 issues.
History
Date User Action Args
2009-05-03 23:48:28hayposetstatus: open -> closed
resolution: out of date -> rejected
messages: + msg87085
2009-04-27 22:52:59ajaksu2setnosy: + ezio.melotti, haypo, ajaksu2
versions: + Python 2.7
messages: + msg86707

components: + Unicode, - None
type: feature request
stage: test needed
2007-12-08 16:59:20naschemesetmessages: + msg58298
2007-12-08 05:14:45alexandre.vassalottisetresolution: out of date
messages: + msg58292
nosy: + alexandre.vassalotti
2005-08-22 20:54:30naschemecreate