[Pyrex] Exception issues with Python 2.5

Francesc Altet faltet at carabos.com
Thu Jul 13 12:13:31 UTC 2006


Hi,

I'm having problems with a Pyrex extension that runs flawlessly in python 2.3 
and 2.4 but fails running Python 2.5. The affected piece of code is an 
iterator made with Pyrex and it fails when it raises the StopIterator:

----------------------------------------------------------------------------------------------
Traceback (most recent call last):
[snip]
  File "/home/faltet/PyTables/pytables/branches/professional/tables/File.py", 
line 1494, in enableUndo
    for row in self._actionlog:
  File "TableExtension.pyx", line 761, in TableExtension.Row.__next__
  File "TableExtension.pyx", line 1087, in TableExtension.Row.__next__general
  File "TableExtension.pyx", line 1095, in TableExtension.Row.finish_riterator
TypeError: exceptions must be strings, classes, or instances, not type
-----------------------------------------------------------------------------------------------

I think the error is probably due to the fact that exceptions are new-style 
classes from Python 2.5 on and Pyrex is too strict in allowing objects that 
may act as exceptions, hence the error.

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"



More information about the Pyrex mailing list