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 ncoghlan
Recipients Oren Milman, eric.snow, ncoghlan, serhiy.storchaka
Date 2017-09-27.10:06:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There's no __prepare__ method in 2.7, so that version can't be affected by this.

For 3.6 and 3.7, I can't reproduce the reported SystemError. Instead, I get:

>>> class BadMetaclass(type):
...     def __prepare__(*args):
...         pass
>>> class Foo(metaclass=BadMetaclass):
...     pass
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in Foo
TypeError: 'NoneType' object is not subscriptable


The error remains the same if I add `@classmethod` to the __prepare__ definition.

That's still thoroughly cryptic and worth changing, but indicates the test should be checking the error message details, not just the error type.
Date User Action Args
2017-09-27 10:06:13ncoghlansetrecipients: + ncoghlan, eric.snow, serhiy.storchaka, Oren Milman
2017-09-27 10:06:13ncoghlansetmessageid: <>
2017-09-27 10:06:13ncoghlanlinkissue31588 messages
2017-09-27 10:06:13ncoghlancreate