Skip to content

ModuleNotFoundError with import-mode=importlib and src layout #10228

Open
@jaraco

Description

@jaraco

In #3396, I'm exploring a fix for namespace packages, but the fix requires the use of import-mode=importlib. When I enable that setting on configparser, it fails with:

ModuleNotFoundError: No module named 'src.backports'; 'src' is not a package

I tried applying the fix in #7936, which promises to address the issue, but the issue persists.

In this case, the failure is not in the tests, but in the package itself. backports.configparser should be able to import relative to that package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: collectionrelated to the collection phasetopic: configrelated to config handling, argument parsing and config file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions