Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

The problem is that __module__ is deduced from the caller's frame in 
type.__new__(). In case if type.__new__() is called directly, __module__ is set 
to the name of the module where type.__new__() is called. So virtually every 
type subclass which defines the __new__ method and calls type.__new__() inside 
it starves from the same issue.

It can be fixed in general if deduce __module__ in type.__call__() instead of 
type.__new__().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue28869>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to