Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Re-Loading the sys or builtins Modules is Problematic #102660

Copy link
Copy link
Open
@ericsnowcurrently

Description

@ericsnowcurrently
Issue body actions

The sys and builtins modules are special in that they are initialized early in interpreter startup, mostly before the import system. They aren't initialized like other modules. Furthermore, the data they expose is fundamental to the interpreter. Reloading the modules doesn't make much sense.

The simplest thing to do is to disallow manually loading them (e.g. via the loader). At the very least we should handle m_copy for these modules carefully. (This came up while working on gh-101660.)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-featureA feature request or enhancementA feature request or enhancement

    Projects

    Status

    Todo
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.