[issue17825] Indentation.offset and SyntaxError.offset mismatch

2014-01-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6d1372237607 by Florent Xicluna in branch '3.3': Issue #17825: Cursor ^ is correctly positioned for SyntaxError and IndentationError. http://hg.python.org/cpython/rev/6d1372237607 -- nosy: +python-dev

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2014-01-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset aeb204b8f6c4 by Florent Xicluna in branch 'default': Issue #17825: Cursor ^ is correctly positioned for SyntaxError and IndentationError. http://hg.python.org/cpython/rev/aeb204b8f6c4 -- ___ Python

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2014-01-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0041be34edbf by Florent Xicluna in branch '2.7': Issue #17825: Cursor ^ is correctly positioned for SyntaxError and IndentationError. http://hg.python.org/cpython/rev/0041be34edbf -- ___ Python tracker

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2014-01-21 Thread Florent Xicluna
Florent Xicluna added the comment: Done. The alignment error with non-ASCII chars should be fixed too, thanks to the work of Serhiy on issue #2382. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2014-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Florent, can you commit your patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825 ___ ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: patch_indenterror_offset_v2.diff LGTM. -- stage: - commit review versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-30 Thread Florent Xicluna
Florent Xicluna added the comment: Patch updated with latest changes of trunk. -- Added file: http://bugs.python.org/file30081/patch_indenterror_offset_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-28 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- components: +Interpreter Core, Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825 ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Ezio Melotti
Ezio Melotti added the comment: I tried a few different lines that result in a syntax error and the position of the '^' always seems ok to me, so I'm not sure there's any bug here: foo:bar ^ from import * ^ try:+ ^ try+ ^ 1? ^

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - works for me status: open - closed type: behavior - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825 ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Florent Xicluna
Florent Xicluna added the comment: Hello again, actually, the attached script demonstrates some issues with the computation of the offset. In rare cases, the computed offset does not match the position of the caret '^' in the traceback. It makes it difficult to reuse exc.offset to display

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Florent Xicluna
Florent Xicluna added the comment: And this additional script (test_indenterror.py) demonstrates a different issue in the traceback module. -- Added file: http://bugs.python.org/file30034/test_indenterror.py ___ Python tracker rep...@bugs.python.org

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825 ___ ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, there is an inconsistence between the traceback module and builtin exception print function. Behavior of traceback is intentional as noted in format_exception_only() (if this comment is not misleading). -- nosy: +georg.brandl,

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Florent Xicluna
Florent Xicluna added the comment: The proposed patch deals with the case of the IndentationError in the traceback module. -- keywords: +patch resolution: works for me - Added file: http://bugs.python.org/file30036/patch_indenterror_offset.diff ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: Removed file: http://bugs.python.org/file30036/patch_indenterror_offset.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825 ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: Added file: http://bugs.python.org/file30037/patch_indenterror_offset.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825 ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your diff file looks broken. I'm not sure it's the traceback module should be fixed and not Python internals. Georg, what you say? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-27 Thread Florent Xicluna
Florent Xicluna added the comment: The previous patch fixes some cases where the caret was wrongly positioned. However, there's probably stuff to fix in Python internals too. See attached test cases (test_traceback_caret.py) which demonstrates other issues with non-ASCII chars or tab in the

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Perhaps Florent is pointing to the fact that for 'except X:', the syntax error is detected at the ' ' at offset 6 but the caret is backed up under the 't' at offset 5*, whereas it is not backed up to the space before 'open'. Which behavior do you propose

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-24 Thread Florent Xicluna
New submission from Florent Xicluna: I noticed a difference between computation of column offset for SyntaxError and IndentationError (a subclass of SyntaxError). It is slightly confusing. def report(exc): print('lineno %s, offset %s' % (exc.lineno, exc.offset)) raise try:

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-24 Thread R. David Murray
R. David Murray added the comment: Well, that would be because the invalid indent is detected when the 'o' is encountered, whereas the invalid syntax is detected when the 't' completes the keyword 'except'. I don't think there is a bug here. -- nosy: +r.david.murray