[issue35376] modulefinder skips nested modules with same name as top-level bad module

rdb report at bugs.python.org
Sun Dec 2 10:00:55 EST 2018


New submission from rdb <rddeblois at gmail.com>:

If modulefinder finds a nested module import (eg. 'import a.b.c') while there is a top-level module with the same name (eg. 'c') that failed to import and got added to the badmodules list, it will skip it entirely without even trying to import it.

This has a trivial fix (attached).  The right thing to do is clearly to check it by fqname in the badmodules dict since that's also what it expects in other locations.

I can make a PR as soon as my CLA gets validated, if that is more convenient.  (Which branch should I make the PR against?)

----------
components: Library (Lib)
files: patch.diff
keywords: patch
messages: 330883
nosy: rdb
priority: normal
severity: normal
status: open
title: modulefinder skips nested modules with same name as top-level bad module
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47968/patch.diff

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35376>
_______________________________________


More information about the Python-bugs-list mailing list