Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue37038

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Make idlelib/run.py runnable.
Type:behaviorStage:resolved
Components:IDLEVersions:Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: terry.reedyNosy List: miss-islington, taleinat, terry.reedy
Priority:normalKeywords:patch

Created on2019-05-24 21:56 byterry.reedy, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 13560mergedterry.reedy,2019-05-24 23:03
PR 13561mergedmiss-islington,2019-05-25 02:18
Messages (5)
msg343433 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2019-05-24 21:56
Slightly simplified, pyshell.ModifiedInterpreter.built_subprocess runsf'{sys.executable} -c "__import__('idlelib.run').run.main()"'."__import__('idlelib.run')" creates sys.modules['idlelib'] from idlelib/__init__.py, creates sys.modules['idlelib.run'] from idlelib/run.py, binds 'run' to the idlelib.run module in the idlelib module, and returns the idlelib module.  It does not bind any names in the main module of the new process.  '.run' gets the idlelib.run module and '.main()' executes its main function.  This eventually executes user code in the so-far untouched main module.During the creation of the idlelib.run module, various other idlelib module are imported.  Some of these import both tkinter and its submodules, such as tkinter.font, adding names such as 'font' to the tkinter modules.  To prevent user code running when it should not, these added names are deleted.#25507.Once the deletion code is run, it will fail with AttributeError if run again, such as from an IDLE editor.  The patch solves this by adding a flag that indicates that the file has already be imported into the process.
msg343449 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2019-05-25 01:59
New changeset81bb97df6138c755e229dcdac9bed747e31b61b3 by Terry Jan Reedy in branch 'master':bpo-37038: Make idlelib.run runnable; add test clause (GH-13560)https://github.com/python/cpython/commit/81bb97df6138c755e229dcdac9bed747e31b61b3
msg343453 -(view)Author: miss-islington (miss-islington)Date: 2019-05-25 05:10
New changesetc70ab1cca0f43dbf3bad4acacd06a792cdbe03c8 by Miss Islington (bot) in branch '3.7':bpo-37038: Make idlelib.run runnable; add test clause (GH-13560)https://github.com/python/cpython/commit/c70ab1cca0f43dbf3bad4acacd06a792cdbe03c8
msg345184 -(view)Author: Tal Einat (taleinat)*(Python committer)Date: 2019-06-11 05:49
Terry, I believe this can be closed now that the fix has been merged?
msg345188 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2019-06-11 05:54
Yes, thank you.
History
DateUserActionArgs
2022-04-11 14:59:15adminsetgithub: 81219
2019-06-11 05:54:03terry.reedysetstatus: open -> closed
resolution: fixed
messages: +msg345188

stage: patch review -> resolved
2019-06-11 05:49:44taleinatsetnosy: +taleinat
messages: +msg345184
2019-05-25 05:10:13miss-islingtonsetnosy: +miss-islington
messages: +msg343453
2019-05-25 02:18:32miss-islingtonsetpull_requests: +pull_request13472
2019-05-25 01:59:57terry.reedysetmessages: +msg343449
2019-05-24 23:03:11terry.reedysetkeywords: +patch
stage: needs patch -> patch review
pull_requests: +pull_request13471
2019-05-24 21:56:19terry.reedycreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp