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.

classification
Title: backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from __future__
Type: behavior Stage: needs patch
Components: Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: alexandre.vassalotti, benjamin.peterson, ezio.melotti, flox, gvanrossum, pitrou, pooryorick, r.david.murray, zhirsch
Priority: normal Keywords: patch

Created on 2008-04-07 18:29 by gvanrossum, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue2570-test.patch r.david.murray, 2009-03-29 01:28 trivial patch to add a unit test for this
Messages (6)
msg65090 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-04-07 18:29
In 3.0, r'\u1234' is a string of 6 characters (\, u, 1, 2, 3, 4).  In
2.6, after "from __future__ import unicode_literals" it is a string of
one character (code point 0x1234).  IMO the 3.0 behavior should be
imported from the future as well (using the same import).
msg109437 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2010-07-06 22:48
Closing this since Python 2.7 is out now.
msg109439 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-07-06 22:53
Isn't this a bug that could be fixed in 2.7.1?
msg109446 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2010-07-07 00:51
Actually, you are right. This could be added as bug fix.
msg109648 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-07-09 00:22
It would be a change in behaviour, which is quite unacceptable for a bugfix release. I think this should be closed.
msg114954 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-08-26 02:56
Yes it does seem like it is too late for this, code might be depending on this behavior now in 2.7.
History
Date User Action Args
2022-04-11 14:56:33adminsetgithub: 46822
2010-08-26 02:56:32r.david.murraysetstatus: pending -> closed
nosy: + r.david.murray
messages: + msg114954

2010-07-09 00:22:14pitrousetstatus: open -> pending

nosy: + pitrou
messages: + msg109648

resolution: rejected
2010-07-07 00:51:03alexandre.vassalottisetstatus: closed -> open
resolution: wont fix -> (no value)
messages: + msg109446

stage: resolved -> needs patch
2010-07-06 22:53:52ezio.melottisetnosy: + ezio.melotti
messages: + msg109439
2010-07-06 22:48:15alexandre.vassalottisetstatus: open -> closed

nosy: + alexandre.vassalotti
messages: + msg109437

resolution: wont fix
stage: needs patch -> resolved
2010-04-01 11:46:27floxsetkeywords: - 26backport
nosy: + pooryorick, benjamin.peterson, zhirsch, flox
2010-04-01 11:45:37floxlinkissue5447 superseder
2009-03-29 01:28:56r.david.murraysetfiles: + issue2570-test.patch
keywords: + patch
stage: test needed -> needs patch
2009-03-29 00:56:37r.david.murraysetpriority: normal
stage: test needed
type: behavior
versions: + Python 2.7, - Python 2.6
2008-04-07 18:29:02gvanrossumcreate