Issue1086

classification
Title: Handling of """quoted strings""" for 2.5a differs from Jy2.2 and Py2.5
Type: Severity: normal
Components: Core Versions: 2.5alpha1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: baoilleach, fwierzbicki, pjenvey
Priority: Keywords:

Created on 2008-07-30.13:53:13 by baoilleach, last changed 2008-07-31.20:17:43 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
test.py baoilleach, 2008-07-30.13:53:12 Python script exhibiting the problem
Messages
msg3366 (view) Author: Noel O'Boyle (baoilleach) Date: 2008-07-30.13:53:12
If you run test.py (attached) on Windows, it gives the following result
under Jy2.2 and Py2.5:
['', 'test string', '']

but a different result under Jy2.5a:
['\r', 'test string\r', '']

test.py was created using IDLE on Windows, and each line has standard
Windows line endings.
msg3371 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008-07-31.15:21:57
This change of behavior also occurs in the C implementation of Python
from version 2.2 to version 2.3+ due to universal newlines (see
http://www.python.org/dev/peps/pep-0278/)

Workaround: either put explicit line endings in the string ("\r\ntest
string\r\n" or read the file in (default line reading does not use
universal newlines).
msg3372 (view) Author: Noel O'Boyle (baoilleach) Date: 2008-07-31.15:33:27
Perhaps I didn't make myself clear. The behaviour of CPython2.5 is
different than Jython2.5a here.

I thought this made it a bug (?)
msg3378 (view) Author: Philip Jenvey (pjenvey) Date: 2008-07-31.20:16:05
Noel, you are right -- this was an actual problem with Jython's parser not 
parsing in universal newlines mode (similar to #1082). I've verified your 
test case has been fixed in r5019-5020. thanks
msg3379 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008-07-31.20:17:43
Thanks pjenvey.  That explains why it worked for me :)
History
Date User Action Args
2008-07-31 20:17:43fwierzbickisetmessages: + msg3379
2008-07-31 20:16:05pjenveysetnosy: + pjenvey
resolution: invalid -> fixed
messages: + msg3378
2008-07-31 15:33:27baoilleachsetmessages: + msg3372
2008-07-31 15:21:57fwierzbickisetstatus: open -> closed
resolution: invalid
messages: + msg3371
nosy: + fwierzbicki
2008-07-30 13:53:13baoilleachcreate