Skip to content

importlib._bootstrap._ERR_MSG removed without deprecation #140019

@jmroot

Description

@jmroot

Bug report

Bug description:

_ERR_MSG was removed by commit 857bdba, which doesn't give any reason for doing so, and it doesn't appear to be related to the bug that that commit was fixing. The removal has broken modulegraph.

While importlib._bootstrap could be considered private and subject to change at any time, 683ab85 says that:

We keep _ERR_MSG and _ERR_MSG_PREFIX as those may be used elsewhere for canonical looking error messages.

That at least suggests that it may be considered an API and thus subject to deprecation periods. If you decide otherwise, that's fine, I just thought I would report this since the removal appears to have been accidental.

CPython versions tested on:

3.14

Operating systems tested on:

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directorytopic-importlibtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions