[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

Nick Coghlan report at bugs.python.org
Fri Jul 15 04:26:11 EDT 2016


Nick Coghlan added the comment:

No changes to 2.7 - the import system logic there is fairly different, since it's still using the old pre-importlib implementation.

For the "package.__main__" case, you're right that we don't want to emit the warning for "-m package", but we *do* want to emit the warning if package.__init__ imports package.__main__ for some reason.

And that's an excellent point about "finding spec" being implementer focused jargon - would "finding module specification" be clearer?

I'd still like to have a link between the error message and the fact the function is called "find_spec", and the official expansion of the abbreviation is "module specification" (hence _ModuleSpec).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27487>
_______________________________________


More information about the Python-bugs-list mailing list