[New-bugs-announce] [issue37796] ModuleFinder does not resolve ".." correctly
Michael Kleehammer
report at bugs.python.org
Thu Aug 8 20:02:55 EDT 2019
New submission from Michael Kleehammer <michael at kleehammer.com>:
The modulefinder module does not handle relative directories properly. The error I found is when one subpackage attempts to import from a sibling subpackage using the form
from ..language import (
DirectiveDefinitionNode,
...
)
In this example, it would report "language.DirectiveDefinitionNode" is missing.
It correctly resolves the names when importing modules, but when an import fails because it is a variable or function, it records the name incorrectly and cannot filter it out later.
I've attached a small test case and there is a README describing the test and results.
----------
components: Library (Lib)
files: test.tar.gz
messages: 349268
nosy: mkleehammer
priority: normal
severity: normal
status: open
title: ModuleFinder does not resolve ".." correctly
type: behavior
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file48535/test.tar.gz
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37796>
_______________________________________
More information about the New-bugs-announce
mailing list