New submission from tkhyn:
Hello, I stumbled upon this issue when using the module_has_submodule function
in Django, which raised an exception when trying to import a dotted path such
as ``parent.module`` when ``parent`` does not exist or is not a package. I
would expect (as well as the
tkhyn added the comment:
Ok, thanks for the reply. Actually the thing that bothered me was the
AttributeError exception. I would probably not have opened a ticket should
find_spec have raised a ModuleNotFoundError (in line with import_module).
Would you consider catching the AttributeError
New submission from tkhyn :
The following script, run with python 3.6.5, highlights an issue with the
class' __name__ attribute being set incorrectly just because of a loop in the
metaclass' __new__ method:
class MC(type):
def __new__(mcs, name, bases, attrs):
for nam
tkhyn added the comment:
oops, indeed. Sometimes the obvious things are not so obvious ..
Sorry for the noise!
--
___
Python tracker
<https://bugs.python.org/issue33