You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2019-04-07.08:06:56.872>created_at=<Date2018-12-02.15:00:55.410>labels= ['3.8', 'type-bug', 'library']
title='modulefinder skips nested modules with same name as top-level bad module'updated_at=<Date2019-04-07.08:06:56.871>user='https://github.com/rdb'
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?)
Fixed for Python 3.8 via the patch for bpo-35936. We won't be backporting that patch as it also migrates modulefinder from the deprecated imp API to the supported importlib one, and is hence considered overly intrusive for a bug fix release.