Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Closed
rdb wants to merge 1 commit into
python:masterpython/cpython:masterfrom
rdb:bpo-35376rdb/cpython:bpo-35376Copy head branch name to clipboard
Closed

bpo-35376: Fix modulefinder skipping some nested modules#10895
rdb wants to merge 1 commit into
python:masterpython/cpython:masterfrom
rdb:bpo-35376rdb/cpython:bpo-35376Copy head branch name to clipboard

Conversation

@rdb

@rdb rdb commented Dec 4, 2018

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

@brandtbucher

Copy link
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.