Skip to content

[3.14] gh-70331: Protect IDLE's imports from user files in the current directory (GH-157643) - #158035

Merged
terryjreedy merged 1 commit into
python:3.14from
miss-islington:backport-6893326-3.14
Sep 23, 2026
Merged

terryjreedy merged 1 commit into
python:3.14from
miss-islington:backport-6893326-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Start the user process with -P, so that the current directory is not on
sys.path while idlelib.run and its dependencies are imported. sys.path
is set later by transfer_path(). Protect main, idle, and pyshell entry points.
(cherry picked from commit 6893326)

Co-authored-by: Serhiy Storchaka [email protected]

… directory (pythonGH-157643)

Start the user process with -P, so that the current directory is not on
sys.path while idlelib.run and its dependencies are imported.  sys.path
is set later by transfer_path().  Protect __main__, idle, and pyshell entry points.
(cherry picked from commit 6893326)

Co-authored-by: Serhiy Storchaka <[email protected]>
@terryjreedy
terryjreedy merged commit 78bdd3d into python:3.14 Sep 23, 2026
51 checks passed
@miss-islington
miss-islington deleted the backport-6893326-3.14 branch September 23, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants