Skip to content

importlib.abc: NameError: name 'warnings' is not defined #121279

Description

@hroncok

Bug report

Bug description:

>>>importimportlib.abc>>>importlib.abc.TraversableResourcesTraceback (mostrecentcalllast):
File"<python-input-3>", line1, in<module>importlib.abc.TraversableResourcesFile"/usr/lib64/python3.13/importlib/abc.py", line34, in__getattr__warnings._deprecated(f"{__name__}.{name}", remove=(3, 14))
^^^^^^^^NameError: name'warnings'isnotdefined. Didyoumean: 'Warning'? Ordidyouforgettoimport'warnings'?

This is a result of #120429

Thew change on the main branch correctly removed unused import warnings, but ti got backported to 3.13 where the import is used.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions