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 <1504208444.11.0.21078181774.issue31315@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
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: <1504208444.11.0.21078181774.issue31315@psf.upfronthosting.co.za>
2017-08-31 19:40:44Oren Milmanlinkissue31315 messages
2017-08-31 19:40:44Oren Milmancreate