Index: Python/ceval.c =================================================================== --- Python/ceval.c (revision 61449) +++ Python/ceval.c (working copy) @@ -3161,6 +3161,13 @@ type->ob_type->tp_name); goto raise_error; } + assert(PyExceptionClass_Check(type)); + if (Py_Py3kWarningFlag && + PyClass_Check(type) && + PyErr_Warn(PyExc_DeprecationWarning, + "exceptions must derive from BaseException in 3.x")) + goto raise_error; + PyErr_Restore(type, value, tb); if (tb == NULL) return WHY_EXCEPTION;