Issue456395
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.
Created on 2001-08-29 04:42 by dalke, last changed 2022-04-10 16:04 by admin. This issue is now closed.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | |
test_pty_patch.txt | gvanrossum, 2001-09-11 13:09 |
Messages (8) | |||
---|---|---|---|
msg6224 - (view) | Author: Andrew Dalke (dalke) * | Date: 2001-08-29 04:42 | |
Under IRIX 6.4 (which is at least two years old) I get the following regression failure in test_pty. It appears newlines are converted to "\r\n". I don't know enough about ptys to suggest a solution. test_pty The actual stdout doesn't match the expected stdout. This much did match (between asterisk lines): ******************************************************* *************** test_pty ******************************************************* *************** Then ... We expected (repr): 'I wish to buy a fish license.\nFor my pet fish, Eric.\n' But instead we got: 'I wish to buy a fish license.\r\nFor my pet fish, Eric.\n' test test_pty failed -- Writing: 'I wish to buy a fish license.\r\nFor my pet fish , Eric.\n', expected: 'I wish to buy a fish license.\nFor my pet fish, Eric.\n' Andrew dalke@dalkescientific.com |
|||
msg6225 - (view) | Author: Guido van Rossum (gvanrossum) * | Date: 2001-09-05 19:04 | |
Logged In: YES user_id=6380 Andrew, which Python version did you use? The current CVS version has this comment somewhere in its CVS log, suggesting that this might be fixed in CVS: Allow the process of reading back what we wrote to a pty to transform linefeeds into carriagereturn-linefeeds (which is apparently what IRIX does.) So I'm tempted to close this as Fixed in CVS. |
|||
msg6226 - (view) | Author: Guido van Rossum (gvanrossum) * | Date: 2001-09-10 15:12 | |
Logged In: YES user_id=6380 No followup. Closed as Fixed. |
|||
msg6227 - (view) | Author: Sjoerd Mullender (sjoerd) * | Date: 2001-09-11 08:03 | |
Logged In: YES user_id=43607 I am reopening this bug. In the current version of Python, with a current version of IRIX (6.5.13), the test still fails. If you look closely at the output and compare it with the comment and code in the test file, you can see why: The output that the test got was 'I wish to buy a fish license.\r\nFor my pet fish, Eric.\n'. The test removes a final \r\n and replaces it with just \n before comparing (the result is shown above), but it doesn't do that for embedded \r\n, and that is what is wrong with the output. I suggest changing the lines if s1[-2:] == "\r\n": s1 = s1[:-2] + "\n" to something like s1 = string.join(string.split(s1, '\r\n'), '\n') (or s1 = '\n'.join(s1.split('\r\n')) ). |
|||
msg6228 - (view) | Author: Guido van Rossum (gvanrossum) * | Date: 2001-09-11 13:09 | |
Logged In: YES user_id=6380 Oops. Can you try the attached patch? |
|||
msg6229 - (view) | Author: Sjoerd Mullender (sjoerd) * | Date: 2001-09-11 13:33 | |
Logged In: YES user_id=43607 The patch does the trick. The test no longer fails. |
|||
msg6230 - (view) | Author: Guido van Rossum (gvanrossum) * | Date: 2001-09-11 14:25 | |
Logged In: YES user_id=6380 OK. Closed again. |
|||
msg6231 - (view) | Author: Andrew Dalke (dalke) * | Date: 2001-09-12 08:29 | |
Logged In: YES user_id=190903 Sorry, was busy doing work for a client. The code was from CVS. I see you've worked with sjoerd to resolve the problem. I've confirmed the fix in CVS on my IRIX system, given the CVS version of Sept. 12, 2001. (This comment is only because I'm used to a process where the original bug submitter should confirm any fixes before it's closed. I know that isn't the std. Python/SF way, but old habits die hard :) |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-10 16:04:23 | admin | set | github: 35070 |
2001-08-29 04:42:25 | dalke | create |