Skip to content

Conversation

@rdb
Copy link

@rdb rdb commented Dec 4, 2018

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.

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 think this merits backporting, but I'll wait until further instructions before I file PRs against the maintenance branches.

I assume this does not need a NEWS.d mention given the insignificance of this fix.

https://bugs.python.org/issue35376

@benjaminp
Copy link
Contributor

Can this get a test in Lib/test/test_modulefinder.py?

@brandtbucher
Copy link
Member

@benjaminp This was fixed and given a regression test in #11787. This PR can probably be closed.

@benjaminp benjaminp closed this Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants