Pull requests

#12 Merged
Repository
takluyver
Branch
missing-modules
Repository
anthony_tuininga
Branch
default

Improve missing modules output

Author
  1. Thomas Kluyver
Reviewers
Description

This does two related things:

Many modules are imported in if or try blocks, commonly where they only exist for certain platforms or certain versions of Python (e.g. modules renamed for Python 3). These show up under 'missing modules' when you freeze it, and one of the most common questions is from people who interpret this as an error. So I've added a brief message to the output, saying "This is not necessarily a problem - the modules may not be needed on this platform."

Secondly, one common source of extraneous 'missing' imports is hashlib: it looks first for constructors in _hashlib, then falls back to modules named _md5 etc. The latter don't exist on my system. I've added a hook that ignores the fallback imports if they fail.

  • Learn about pull requests

Comments (0)