[issue1031213] Use correct encoding for printing SyntaxErrors

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: In release25-maint, PyErr_Print() should be replaced with PyErr_Clear() also. Committed revision 58991. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1031213 _

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-15 Thread atsuo ishimoto
atsuo ishimoto added the comment: That's fine with me. Please replace PyErr_Print() with PyErr_Clear(). _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1031213 _ ___

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-15 Thread Guido van Rossum
Guido van Rossum added the comment: atsuo ishimoto added the comment: That's fine with me. Please replace PyErr_Print() with PyErr_Clear(). Done. Committed revision 58471. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1031213

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-11 Thread atsuo ishimoto
atsuo ishimoto added the comment: Sorry for insufficient comment. When a codec raised an exception, I think the exception should be reported. Otherwise, user cannot know why Python prints broken line of code. Should we silently clear the exception raised by codecs, or print a message such

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-11 Thread Martin v. Löwis
Martin v. Löwis added the comment: Should we silently clear the exception raised by codecs, or print a message such as Codec raised an exception while processing compile error. ? Can you create a test case that triggers that specific problem? Regards, Martin

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-11 Thread atsuo ishimoto
atsuo ishimoto added the comment: Codecs would hardly ever raises exception here. Usually, exception raised here would be a MemoryError. The unicode string we are trying to encode is just decoded by same codec. If codec raises exception other than MemoryError, the codec will likely have

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-11 Thread Guido van Rossum
Guido van Rossum added the comment: There are tons of situations where such an exception will be suppressed, ofr better or for worse. I don't think this one deserves such a radical approach. On 10/11/07, atsuo ishimoto [EMAIL PROTECTED] wrote: atsuo ishimoto added the comment: Codecs would

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: ishimoto: in dec_utf8, there is a PyErr_Print call. What is the purpose of this call? _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1031213 _

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-10 Thread Guido van Rossum
Guido van Rossum added the comment: PyErr_Print() is called to report exception raised by codec. If PyUnicode_DecodeUTF8() or PyUnicode_AsEncodedString() return NULL, PyErr_Print() is called. This comment is not very helpful; it describes what happens, but not why, or whether that is a good

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-10-10 Thread atsuo ishimoto
atsuo ishimoto added the comment: PyErr_Print() is called to report exception raised by codec. If PyUnicode_DecodeUTF8() or PyUnicode_AsEncodedString() return NULL, PyErr_Print() is called. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1031213

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-09-04 Thread Martin v. Löwis
Martin v. Löwis added the comment: Thanks for the patch. It wouldn't work as-is, because it broke PGEN. I fixed that, and committed the change as r57961 and r57962. -- resolution: - accepted status: open - closed versions: +Python 2.5, Python 2.6 _

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-09-04 Thread Guido van Rossum
Guido van Rossum added the comment: We should make sure this is *not* merged into Py3k; there, things remain unicode until they're printed, at which point the only encoding that matters is the output file's encoding. _ Tracker [EMAIL PROTECTED]

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-08-23 Thread Georg Brandl
Changes by Georg Brandl: -- title: Patch for bug #780725 - Use correct encoding for printing SyntaxErrors _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1031213 _