Namespace packages supported by default?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
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 (https://github.com/jaraco/skeleton/commit/7455f2f25310b2d778a648e45d32033ccc790946).
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the mypy 0.990 changelog and the behavior of the explicit_package_bases configuration. Reproduce the duplicate-module error with a namespace-package project such as jaraco or backports, then determine the expected default behavior. Done would require a decided default and the affected namespace-package scenario passing or being clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100