Issue 2570: backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from future (original) (raw)

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:33 admin set github: 46822
2010-08-26 02:56:32 r.david.murray set status: pending -> closednosy: + r.david.murraymessages: +
2010-07-09 00:22:14 pitrou set status: open -> pendingnosy: + pitroumessages: + resolution: rejected
2010-07-07 00:51:03 alexandre.vassalotti set status: closed -> openresolution: wont fix -> (no value)messages: + stage: resolved -> needs patch
2010-07-06 22:53:52 ezio.melotti set nosy: + ezio.melottimessages: +
2010-07-06 22:48:15 alexandre.vassalotti set status: open -> closednosy: + alexandre.vassalottimessages: + resolution: wont fixstage: needs patch -> resolved
2010-04-01 11:46:27 flox set keywords: - 26backportnosy: + pooryorick, benjamin.peterson, zhirsch, flox
2010-04-01 11:45:37 flox link issue5447 superseder
2009-03-29 01:28:56 r.david.murray set files: + issue2570-test.patchkeywords: + patchstage: test needed -> needs patch
2009-03-29 00:56:37 r.david.murray set priority: normalstage: test neededtype: behaviorversions: + Python 2.7, - Python 2.6
2008-04-07 18:29:02 gvanrossum create