bpo-36298: Raise ModuleNotFoundError in pyclbr when a module can't be found by brettcannon · Pull Request #12358 · python/cpython

Conversation

@brettcannon

Before, an AttributeError was raised due to trying to access an attribute that exists on specs but having received None instead for a non-existent module.

https://bugs.python.org/issue36298

mental32

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed diff (looks good), Interested to know your thoughts on the comments.

@ned-deily

@brettcannon Is there a particular reason you think this should be backported to 3.6?

@brettcannon

@ned-deily no, and since it's a change in exception it probably shouldn't be backported, so I have dropped the backporting idea.

@miss-islington