|
Re: Pyrex exception type checking broken under Python 2.5 (and earlier): msg#00042python.pyrex
Stefan Behnel wrote: > Pyrex uses this code in __Pyx_Raise() to check if an exception object has the > right type for being raised: > The problem is that exceptions in Py2.5 have become new-style classes which no > longer fall under any of the above checks. > Also, support for string exceptions is deprecated and supposed to be > removed in later Python versions. I therefore propose to actually remove the > above check from Pyrex completely. What I'd really like is an API call for raising an exception that does all the same things as the Python raise statement. There didn't seem to be such a call at the time I wrote that code. I'd be wary about removing the checks altogether, because I wouldn't be surprised if you could cause a crash by stuffing arbitrary values into the exception variables. It definitely needs updating for 2.5, though, and I take the point about string exceptions. I'll probably drop support for them. -- Greg |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Pyrex exception type checking broken under Python 2.5 (and earlier): 00042, Stefan Behnel |
|---|---|
| Next by Date: | Re: Pyrex exception type checking broken under Python 2.5 (and earlier): 00042, Stefan Behnel |
| Previous by Thread: | Pyrex exception type checking broken under Python 2.5 (and earlier)i: 00042, Stefan Behnel |
| Next by Thread: | Re: Pyrex exception type checking broken under Python 2.5 (and earlier): 00042, Stefan Behnel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |