Skip to content

inspect module caches can grow without bound #116804

Open
@encukou

Description

@encukou

inspect.getmodule uses these dicts as caches:

modulesbyfile = {}
_filesbymodname = {}

In #116731, we might make refleak tests clear/ignore the caches. But that's not entirely correct: they could grow without bound, with dynamically created files/modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions