Author eric.araujo
Recipients eric.araujo, ghaering, ncw, pitrou
Date 2011-11-24.16:38:13
SpamBayes Score 1.49242e-06
Marked as misclassified No
Message-id <1322152694.62.0.422138848569.issue9510@psf.upfronthosting.co.za>
In-reply-to
Content
> Reading PEP 0249 I can see Gerhard is correct, this patch would violate the PEP.
Me too.

> I think that the PEP is slightly flawed in that users are encouraged to raise exceptions
> called "Warning".  IMHO a Warning is never an exceptional condition and should be notified
> by the warnings framework.
That’s probably a bad word choice in the PEP.

> This obviously confused the authors of MySQLdb, who do indeed warn() their Warning classes
> rather than raise() them, and it is very useful to be able to filter them.
> To obey the letter of the PEP the authors of the MySQLdb interface multiply inherit their
> Warning class from exceptions.StandardError and exceptions.Warning.
I think they are mistaken, given that the DB API warnings are actually errors.
History
Date User Action Args
2011-11-24 16:38:14eric.araujosetrecipients: + eric.araujo, ghaering, pitrou, ncw
2011-11-24 16:38:14eric.araujosetmessageid: <1322152694.62.0.422138848569.issue9510@psf.upfronthosting.co.za>
2011-11-24 16:38:14eric.araujolinkissue9510 messages
2011-11-24 16:38:13eric.araujocreate