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
deprecate importing components of IDLE #69049
Comments
One of the concerns with making significant structural changes to the IDLE codebase is breakage of external that might import a piece of idlelib (so not just 'import idlelib' but a particular submodule). PEP-434 already makes the case that this behaviour is unsupported ("the modules are undocumented and effectively private implementations"). In the interests of not digging this particular hole any further, I'm suggesting we make this official. I don't know what the appropriate mechanism would be (e.g. something in IDLE's README.txt file, something at the top of each IDLE module, etc.). Based on some suggestions on idle-dev, I did some searching to find out what impact this might have. As expected, most uses import the whole thing, either documenting how to run IDLE, or launching it as an external editor. This is done as both "import idlelib" but also as "import idlelib.idle" Turtledemo appears to be the only thing in stdlib that imports a piece of idlelib. From nullege.com, one reference to a now-defunct wiki/collaboration tool called Springnote. From programcreek.com, nothing significant. Multiple applications do import PyShell as a way of starting a Python shell in their application. Usually they do just call PyShell.main(). Sometimes though they do "reach inside" in fairly significant ways that might break if the code were substantially changed. For example, search for PyShell in http://igraph.org/python/doc/igraph.app.shell-pysrc.html I could locate no other significant uses based on Google search, etc. The one exception I would therefore suggest to the "no importing submodules" would be importing PyShell to open up a Python shell window. I'd go further to suggest that the existing PyShell be called something else, and a new PyShell wrapper be created which documents an official API (with therefore very limited mucking inside), and then delegates to an actual implementation. |
Thank you for doing the research. It seems that extensions are the only unknown. Steps for doing this.
The idlelib package implements the Idle application, which include an interactive shell and editor. The files named idle.* should be used to start Idle. The other files are private implementations and should not be imported by other applications. Their details are subject to change. See PEP-434 for more informaton.
# Private implementation module. API subject to change.
|
New changeset b7bbb2c1e1f9 by Terry Jan Reedy in branch '2.7': New changeset 084a8813f05f by Terry Jan Reedy in branch '3.4': |
Individual files will be handled in separate issues. |
New changeset e9edb95ca8b6 by Terry Jan Reedy in branch '2.7': New changeset 5087ca9e6002 by Terry Jan Reedy in branch '3.4': |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: