2.3.1 — Hotfix
Bug fixes
- Relative imports in
__init__.pyresolve to wrong parent package —
from . import alphain a nested package init (e.g.pkg/sub/__init__.py)
resolved to the grandparent (pkg.alpha) instead of the package itself
(pkg.sub.alpha). Affected all__init__modules whose fully qualified
name contains at least one dot. Fixed in both file-based and sans-IO modes.
(#121 — thanks @tristanlatr)
Notes
from_sources():__init__naming convention — to get correct relative
import resolution for package__init__modules, pass"pkg.sub.__init__"
as the module name (not just"pkg.sub"). The previous behaviour silently
produced wrong or missing edges.resolve_import()— new shared utility inpyan.anutilsfor resolving
relative imports. Replaces the inline logic in both the call-graph analyzer
and module-graph analyzer.__all__added toanutils,main, andmodvismodules.
Full changelog: https://github.com/Technologicat/pyan/blob/master/CHANGELOG.md