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: Rename idlelib to just idle
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.7
process
Status: closed Resolution: later
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Aaron Hall, eric.araujo, rhettinger, serhiy.storchaka, terry.reedy
Priority: low Keywords:

Created on 2017-09-01 06:56 by rhettinger, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (6)
msg301086 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-09-01 06:56
Currently, I start IDLE with:

  $ python -m idlelib.idle

It would be nice add __main__.py to simplify this to:

  $ python -m idlelib

And perhaps, more boldly rename the directory so that we get:

  $ python -m idle
msg301087 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-01 07:11
This is a duplicate of issue24212.
msg301088 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-09-01 08:22
I would also like Terry to consider renaming or aliasing idlelib to idle.  That would further simplify the startup and it is a more appropriate name given that IDLE is used as an application rather than as a library.
msg301106 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-01 14:00
idlelib.__main__ was added in 3.3: Patch was d543f2b8b0b66af330aae6764e53495cda48fd4e
Author: Andrew Svetlov <andrew.svetlov@gmail.com>
Date: 3/26/2012 3:11:46 PM
Message: IDLE can be launched as python -m ildelib [misspelled]

#24212 was about backporting the addition to 2.7.  I opened it after PEP 434 clearly made this permitted.  The attempt had the problems described therein.
---

I quite agree that 'python -m idle' would be nicer than 'python -m idlelib', just as the latter is nicer than idlelib.idle or  idlelib.pyshell.  However, switching would break every text (and program) that tell people about any of the latter three. That would include many of my (and other people's) Stackoverflow comments and answers.  I am therefore neither inclined to do this, nor do I think I am allowed to by out back-compatibility policies.

My impression is that the directory name linking needed to make both work without two copies is OS specific and not something that can be done in the repository.  I don't even know how to do it properly on Windows.  I am not going to try to get all installer makers to agree to make a change.
msg301137 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2017-09-01 17:01
What about adding a simple Lib/idle.py that imports and runs the main function from idlelib?
msg301210 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-04 06:33
Hi Éric.  Adding idle.py would make -m idle work.  But I believe it would violate existing policy.  So I will not propose it on python-ideas or pydev and hope no one else does either.

PEP 434, at least in part, formalized what I believe was older practice with respect to idlelib.  I was surprised by the negative reaction that ensued and do not want a repeat.

Raymond, I have considered this at length and see no prospect for a positive change at this time.

This issue reminded me to open #31329, to index 'idlelib' and better document the options for starting IDLE..
History
Date User Action Args
2022-04-11 14:58:51adminsetgithub: 75500
2017-09-04 06:33:57terry.reedysetstatus: open -> closed
priority: normal -> low
messages: + msg301210

resolution: later
stage: resolved
2017-09-04 04:06:29Aaron Hallsetnosy: + Aaron Hall
2017-09-01 17:01:08eric.araujosetnosy: + eric.araujo
messages: + msg301137
2017-09-01 14:00:34terry.reedysetsuperseder: Idle, 2.7, backport idlelib.__main__, enable py -m idlelib ->
messages: + msg301106
2017-09-01 08:22:09rhettingersetstatus: closed -> open
title: Add __main__.py to IDLE -> Rename idlelib to just idle
messages: + msg301088

resolution: duplicate -> (no value)
stage: resolved -> (no value)
2017-09-01 07:11:42serhiy.storchakasetstatus: open -> closed

superseder: Idle, 2.7, backport idlelib.__main__, enable py -m idlelib

nosy: + serhiy.storchaka
messages: + msg301087
resolution: duplicate
stage: resolved
2017-09-01 06:56:13rhettingercreate