[Numpy-discussion] Python 3 porting

Pauli Virtanen pav@iki...
Mon Feb 15 13:58:59 CST 2010


ma, 2010-02-15 kello 21:41 +0200, Stéfan van der Walt kirjoitti:
[clip]
> > On Python 3.1, the numpymemoryview_init is a stub function that does
> > nothing. I guess this is another single-file compilation issue -- the
> > new file should be included in multiarraymodule_onefile.c. Should be
> > fixed now.
> 
> Thanks, it works now.
> 
> I wonder if 2to3 is doing its job, though.  I had to make the attached
> changes before I could import.

This seems to be the same problem Bruce had.

Doesn't seem like 2to3 is doing what it's supposed to do. In fact, the
2to3 shipped with Python 2.6 does those changes by itself, but the one
with Python 3.1.1 does not. Obviously, I was all the time using Python
2.6 shipped 2to3. I'll try to find a workaround.


> Progress:  the unit test suite starts to run, but fails soon after.
> 
> .................Fatal Python error: Inconsistent interned string
> state.
>
> Program received signal SIGABRT, Aborted.
> 0x00007fff84e1efe6 in __kill ()
> (gdb) bt
> #0  0x00007fff84e1efe6 in __kill ()
> #1  0x00007fff84ebfe32 in abort ()
> #2  0x00000001000cd715 in Py_FatalError ()
> #3  0x0000000100069508 in unicode_dealloc ()
> #4  0x000000010065cd1f in UNICODE_to_STRING (ip=0x101f06fd0 "a",
> op=0x101f01470 "abc", n=4, aip=0x101ce5de8, aop=0x101901a28) at
> arraytypes.c.src:1501
> #5  0x00000001006771ca in PyArray_CastTo (out=0x101901a28,
> mp=0x101ce5de8) at convert_datatype.c:336
> #6  0x00000001006772e1 in PyArray_CastToType (mp=0x101ce5de8,
> at=<value temporarily unavailable, due to optimizations>, fortran_=0)
> at convert_datatype.c:73
> #7  0x0000000100681569 in array_cast (self=0x101ce5de8, args=<value
> temporarily unavailable, due to optimizations>) at methods.c:760

The platform is OSX -- 32 or 64 bits? Is your Python unicode narrow or
wide? Which test triggers the issue?

Thanks,
Pauli





More information about the NumPy-Discussion mailing list