]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 1 Jul 2026 17:03:14 +0000 (19:03 +0200)
committerGitHub <noreply@github.com>
Wed, 1 Jul 2026 17:03:14 +0000 (17:03 +0000)
commit6aa89d98e3049fc67b10070fa84e5ef4bb4a01f5
treeafb22323794975d9e53dcc1f0d163ac84a6b00bc
parentc2d275202830651e91c779c66213bd5ed4610144
[3.15] gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739) (#152807)

gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739)

The idlelib directory ends up on sys.path when idle.py is run as a script,
and it was passed to the user process, where it let user code import
idlelib submodules as top-level modules, such as "import help".
(cherry picked from commit 3f5491a09223f7371b4b4c92225e8dfdf1c989b7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/idlelib/idle_test/test_pyshell.py
Lib/idlelib/pyshell.py
Misc/NEWS.d/next/IDLE/2026-07-01-15-00-00.gh-issue-134300.iDlPaT.rst [new file with mode: 0644]