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 Oren Milman
Recipients Oren Milman, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Date 2017-08-31.19:40:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
do you mean that we should fix it to raise a TypeError?

the assertion is there, but not explicitly. 
get_encoded_name() calls PyUnicode_FindChar(), which calls
PyUnicode_READY(), which does assert(_PyUnicode_CHECK).

so i get:
>>> import imp
>>> class BadSpec:
...     name = 42
...     origin = 'foo'
>>> imp.create_dynamic(BadSpec())
Assertion failed: PyUnicode_Check(op), file ..\Objects\unicodeobject.c, line 380
Date User Action Args
2017-08-31 19:40:44Oren Milmansetrecipients: + Oren Milman, brett.cannon, ncoghlan, eric.snow, serhiy.storchaka
2017-08-31 19:40:44Oren Milmansetmessageid: <>
2017-08-31 19:40:44Oren Milmanlinkissue31315 messages
2017-08-31 19:40:44Oren Milmancreate