Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idle 3.4.1-: closing Find in Files while in progress closes Idle #65894

Closed
terryjreedy opened this issue Jun 8, 2014 · 3 comments
Closed

Idle 3.4.1-: closing Find in Files while in progress closes Idle #65894

terryjreedy opened this issue Jun 8, 2014 · 3 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 21695
Nosy @terryjreedy

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/terryjreedy'
closed_at = <Date 2014-06-10.06:54:56.212>
created_at = <Date 2014-06-08.19:57:39.178>
labels = ['expert-IDLE', 'type-bug']
title = 'Idle 3.4.1-: closing Find in Files while in progress closes Idle'
updated_at = <Date 2019-03-23.20:08:09.589>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2019-03-23.20:08:09.589>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2014-06-10.06:54:56.212>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2014-06-08.19:57:39.178>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 21695
keywords = []
message_count = 3.0
messages = ['220052', '220140', '220141']
nosy_count = 2.0
nosy_names = ['terry.reedy', 'python-dev']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue21695'
versions = ['Python 3.4']

@terryjreedy
Copy link
Member Author

Reproducer: On Windows, Open Idle and editor. In editor grep (alt-f3), for instance, 'print' in /Lib/*.py. While hits are flashing by, close the output window with [x]

2.7.6 or .7: Output window closes, Idle continues as desired.
3.3.5 or 3.4.1: All Idle windows - shell, editor, output
3.4.1+, 3.5.0a, debug builds run from console interpreter:
Output window closes, Idle continues, as desired.
console window displays exception ending with

File "F:\Python\dev\5\py35\lib\idlelib\GrepDialog.py", line 90, in grep_it
(fn, lineno, line))
File "F:\Python\dev\5\py35\lib\idlelib\OutputWindow.py", line 40, in write
self.text.insert(mark, s, tags)
AttributeError: 'NoneType' object has no attribute 'insert'

The specific fix is to wrap the text insert with try: except: break. The immediate mystery is why 2.7 did not shutdown with nowhere to print the traceback.

@terryjreedy terryjreedy self-assigned this Jun 8, 2014
@terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Jun 8, 2014
@python-dev
Copy link
Mannequin

python-dev mannequin commented Jun 10, 2014

New changeset ec91ee7d9d8d by Terry Jan Reedy in branch '2.7':
Issue bpo-21695: Catch AttributeError created when user closes grep output window
http://hg.python.org/cpython/rev/ec91ee7d9d8d

New changeset d9c1f36494b6 by Terry Jan Reedy in branch '3.4':
Issue bpo-21695: Catch AttributeError created when user closes grep output window
http://hg.python.org/cpython/rev/d9c1f36494b6

@terryjreedy
Copy link
Member Author

I added try: except: and tested on installed 3.4.1, which previously failed. There is no way that I know of to start repository Idle without a console to print a traceback to. I added a missing import, removed an incorrect comment, added others, and changed 'print x' in 2.7 to 'print(x)' to reduce differences between versions for future patches.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant