Author Oren Milman
Recipients Oren Milman
Date 2017-09-26.07:38:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506411492.28.0.663708563155.issue31588@psf.upfronthosting.co.za>
In-reply-to
Content
The following code causes a SystemError:
class BadMetaclass(type):
    def __prepare__(*args):
        pass

class Foo(metaclass=BadMetaclass):
    pass


This is because builtin___build_class__() assumes that __prepare__() returned a
mapping, and passes it to PyEval_EvalCodeEx(), which passes it to
_PyEval_EvalCodeWithName(), which passes it to _PyFrame_New_NoTrack(), which
raises the SystemError.


This issue seems related to #17421.
History
Date User Action Args
2017-09-26 07:38:12Oren Milmansetrecipients: + Oren Milman
2017-09-26 07:38:12Oren Milmansetmessageid: <1506411492.28.0.663708563155.issue31588@psf.upfronthosting.co.za>
2017-09-26 07:38:12Oren Milmanlinkissue31588 messages
2017-09-26 07:38:12Oren Milmancreate