Skip to content

Namespace packages supported by default? #14057

Open
@jaraco

Description

@jaraco

I notice in the changelog that 0.990 adds support for namespace packages by default.

I've been using mypy on namespace packages (jaraco, svg, backports, and others) for some time now (jaraco/skeleton@7455f2f).

With the release of mypy 0.990, however, tests have started failing across all projects with namespace packages:

error: Source file found twice under different module names: "collections" and "jaraco.collections"

The change log indicates that 0.990 adds support for namespace packages by default. Annoyingly, this change has had the opposite effect for my projects. I find that I can restore functionality by adding explicit_package_bases = True to the config file (or equivalent command line). It's slightly annoying to have to add this configuration to all of my projects just to support some projects with namespace packages.

Is it possible that explicit package bases will become default in the future?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions