Stefan, in Py3, PyInt is gone and we only have PyLong. Then the code follows other path.
Some days ago I filed an issue and provided a patch wich was accepted, now core Python (2.7 and 3.1) will raise OverflowError... If you want, I can implement some vile hackery, I just need to check myself if the PyLong is negative (PyLong implementation abuses the tp_size member of the object struct to carry the sign) On Sat, Feb 21, 2009 at 3:40 PM, Stefan Behnel <[email protected]> wrote: > > Stefan Behnel wrote: >> just a quick note that I'm currently trying to get the test suite running >> under Python 3.0.1. This release features a couple of fixes for quirks that >> were found in the 3.0 release. It is now a lot stricter regarding Py3 >> concepts. > > Interesting enough, the size_t tests fail for me with a TypeError: > > --------------------------------------- > Failed example: > a.foo(-1) #doctest: +ELLIPSIS > Expected: > Traceback (most recent call last): > ... > OverflowError: ... > Got: > Traceback (most recent call last): > File "/usr/local/python3.0.1-debug/lib/python3.0/doctest.py", line > 1234, in __run > compileflags, 1), test.globs) > File "<doctest size_t[10]>", line 1, in <module> > a.foo(-1) #doctest: +ELLIPSIS > File "size_t.pyx", line 53, in size_t.A.foo (size_t.cpp:569) > TypeError: can't convert negative int to unsigned > --------------------------------------- > > Wasn't there supposed to be an OverflowError instead? > > Stefan > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
