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.

classification
Title: IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))
Type: behavior Stage: resolved
Components: IDLE, Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: asvetlov Nosy List: BreamoreBoy, asvetlov, eric.araujo, gpolo, python-dev, roger.serwy, terry.reedy
Priority: high Keywords: needs review, patch

Created on 2008-08-16 23:32 by gpolo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_idle_startup_hang.diff gpolo, 2008-08-16 23:32 review
Messages (13)
msg71249 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-08-16 23:32
Passing a single directory as a command line argument can make IDLE hang.
To achieve this the user needs to configure IDLE to open an editor
window by default.

The attached patch discards filenames that failed to load, so in the end
it may open an empty editor window instead of hanging.
msg89022 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-06-06 23:10
Idle has changed a bit since the initial message, so it no longer hangs
when it is configured to open an edit window by default, but now it
hangs when running it as: idle -e <somedirnamehere> (which the patch fixes).
msg110682 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-18 20:25
Please refer to msg89022.
msg148593 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2011-11-29 18:59
I can confirm that using "idle -e <dir>" still causes a hang on Windows using 3.2.2 and on Ubuntu using 2.7.1 and 3.2

The given patch fixes the problem on those platforms.
msg156464 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-20 21:04
New changeset 01404295138d by Andrew Svetlov in branch 'default':
#3573: idle now doesn't hungs if launched as: idle -e <directory>
http://hg.python.org/cpython/rev/01404295138d
msg156465 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-03-20 21:06
Fixed. Thanks to Guilherme Polo and Roger Serwy.
msg156488 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-21 11:32
New changeset a95b19b3b4cd by Andrew Svetlov in branch '3.2':
#3573: idle now doesn't hungs if launched as: idle -e <directory>
http://hg.python.org/cpython/rev/a95b19b3b4cd

New changeset cdcd1f7f0882 by Andrew Svetlov in branch 'default':
Merge from 3.2 for issue #3573, fix Misc/NEWS as Ned Deily guess.
http://hg.python.org/cpython/rev/cdcd1f7f0882
msg156489 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-21 11:36
New changeset a9be863e5734 by Andrew Svetlov in branch '2.7':
#3573: idle now doesn't hungs if launched as: idle -e <directory>
http://hg.python.org/cpython/rev/a9be863e5734
msg156490 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-03-21 11:36
Backported to 3.2 and 2.7
msg156496 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-03-21 16:46
Thanks for applying.
Just note that unlike with svn, with hg it is stronly recommended to apply to 3.2 first and forward port to 3.3. Something about the DAGs working better.
msg156497 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-03-21 16:50
Will do in next time.
Thank you for instructions.
msg156523 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-21 23:27
3-22 00:26

> with hg it is stronly recommended to apply to 3.2 first and forward port to 3.3.
> Something about the DAGs working better.

The default branch (3.3) is a superset of 3.2: all bug fixes are in both branches, and new features are in 3.3 only.  We’ve chosen the simplest way to achieve that with Mercurial: we commit to 3.2 and merge into default.  This ensures that no fix committed to one version is forgotten in the other, and also automates the file merging.  That’s just it.
msg156524 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-21 23:27
(Edited for typos, ignore the “3-22 00:26” that comes from I don’t know where)
History
Date User Action Args
2022-04-11 14:56:37adminsetgithub: 47823
2012-03-21 23:27:41eric.araujosetmessages: + msg156524
2012-03-21 23:27:02eric.araujosetmessages: + msg156523
2012-03-21 23:26:48eric.araujosetmessages: - msg156522
2012-03-21 23:26:26eric.araujosetnosy: + eric.araujo
messages: + msg156522
2012-03-21 16:50:03asvetlovsetmessages: + msg156497
2012-03-21 16:46:24terry.reedysetmessages: + msg156496
2012-03-21 11:36:55asvetlovsetmessages: + msg156490
versions: + Python 2.7, Python 3.2
2012-03-21 11:36:10python-devsetmessages: + msg156489
2012-03-21 11:32:12python-devsetmessages: + msg156488
2012-03-20 21:31:21asvetlovsetversions: + Python 3.3, - Python 3.1, Python 2.7, Python 3.2
2012-03-20 21:07:01asvetlovsetstage: patch review -> resolved
2012-03-20 21:06:26asvetlovsetstatus: open -> closed
2012-03-20 21:06:10asvetlovsetassignee: asvetlov
resolution: fixed
messages: + msg156465
2012-03-20 21:04:55python-devsetnosy: + python-dev
messages: + msg156464
2012-03-20 20:10:04asvetlovsetnosy: + asvetlov
2011-11-29 20:53:08rhettingersetpriority: normal -> high
2011-11-29 18:59:37roger.serwysetnosy: + roger.serwy
messages: + msg148593
2010-07-18 20:25:26BreamoreBoysetnosy: + BreamoreBoy, terry.reedy

messages: + msg110682
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 3.0
2009-08-13 03:29:28gpololinkissue4985 superseder
2009-08-13 03:28:40gpolosetsuperseder: Idle hangs when given a nonexistent filename. ->
2009-08-13 03:28:22gpolosetsuperseder: Idle hangs when given a nonexistent filename.
2009-06-06 23:10:29gpolosetmessages: + msg89022
2009-04-26 22:13:37ajaksu2setpriority: normal
type: behavior
components: + IDLE
stage: patch review
2008-08-21 20:28:59brett.cannonsetkeywords: + patch
2008-08-21 19:06:22gpolosetkeywords: + needs review, - patch
2008-08-16 23:32:25gpolocreate