Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-35376: Fix modulefinder skipping some nested modules #10895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

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