Pyreverse: Incorrect handling of implicit Namespaces (PEP 420) #10173
Closed
Description
Current Problem:
The discover_package_path function fails to handle PEP 420 implicit namespaces, as it relies on finding init.py files to determine valid package paths. This causes issues when working with implicit namespaces, where such files are not required.
Desired Solution:
Separate the logic for explicit and implicit namespaces:
- Explicit namespaces: Identify using
__init__.py
. - Implicit namespaces: Identify according to PEP 420.
- Error handling: Raise an exception if neither condition is met.
Additional Context:
This issue comes from discussions in #10026 and relates to challenges observed in #10077, where missing or empty init.py files impacted pyreverse's to correctly identify detect package relationships.
Metadata
Assignees
Labels
No labels