[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-12-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you, Roger. Fixed.

--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d3c81ef728ae by Serhiy Storchaka in branch '2.7':
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
http://hg.python.org/cpython/rev/d3c81ef728ae

New changeset e1ef04cfb57c by Serhiy Storchaka in branch '3.2':
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
http://hg.python.org/cpython/rev/e1ef04cfb57c

New changeset f111e7078d54 by Serhiy Storchaka in branch '3.3':
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
http://hg.python.org/cpython/rev/f111e7078d54

New changeset 69a2f6a7c257 by Serhiy Storchaka in branch 'default':
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
http://hg.python.org/cpython/rev/69a2f6a7c257

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-12-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-12-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
nosy: +kbk
stage:  -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
Removed message: http://bugs.python.org/msg176255

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Serhiy, was msg176255 meant for issue16491?

Yes, sorry.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-23 Thread Roger Serwy

Roger Serwy added the comment:

Serhiy, was msg176255 meant for issue16491?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The bug is somewhere in print_exception() function in Lib/idlelib/run.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-23 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy
versions:  -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-18 Thread Roger Serwy

Roger Serwy added the comment:

That's a good point. Attached is a revision to omit IndentationError.

Thanks Serhiy.

--
Added file: http://bugs.python.org/file28032/editor_token_error_rev1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

IndentationError is a subclass of SyntaxError.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-18 Thread Roger Serwy

Roger Serwy added the comment:

I encountered this behavior while testing an extension that highlights tabs and 
trailing whitespace. The very first test file I wrote caused this crash. See 
the attached "sample_token_error.py".

--
Added file: http://bugs.python.org/file28031/sample_token_error.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-18 Thread Roger Serwy

New submission from Roger Serwy:

IDLE's IndentSearcher class in EditorWindow.py can raise an uncaught 
IndentationError when opening a file. The attached patch fixes the problem by 
catching everything that the tokenize module can raise explicitly, namely 
IndentationError, TokenError, and SyntaxError.

Alternatively, the except clause can be left bare, as it is disappointing to 
crash IDLE when simply guessing the indent width of a file. (See "guess_indent" 
in EditorWindow.py)

--
components: IDLE
files: editor_token_error.patch
keywords: patch
messages: 175895
nosy: serwy
priority: normal
severity: normal
status: open
title: IDLE - fatal error when opening a file with certain tokenizing errors
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28030/editor_token_error.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com