This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients ncoghlan, petr.viktorin, xiang.zhang
Date 2016-08-17.17:50:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks Petr. I'd appreciate it if you are willing to review the patch.

Upload a patch to fix this, along with tests and doc updating.

But here is something different. In PEP489, it is explicitly stated that "Py_mod_create slot is not responsible for setting import-related attributes specified in PEP 451 (such as __name__ or __loader__ ) on the new module". So when an object(even ModuleType instances) is returned, it's __name__ attribute is not set and we can't rely on it (which means we can't even use PyModule_GetNameObject). I then use the name attribute of the spec. Looking forward to feedback.
Date User Action Args
2016-08-17 17:50:03xiang.zhangsetrecipients: + xiang.zhang, ncoghlan, petr.viktorin
2016-08-17 17:50:02xiang.zhangsetmessageid: <>
2016-08-17 17:50:02xiang.zhanglinkissue27782 messages
2016-08-17 17:50:02xiang.zhangcreate