regression in 0.13

2 views
Skip to first unread message

Ondrej Certik

unread,
Sep 28, 2010, 7:14:51 PM9/28/10
to cython...@googlegroups.com
Hi,

as reported here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597848

if you compile:

def foo():
"bar"
return 42
del foo

using new cython, you get after importing it:


>>> import a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "a.pyx", line 1, in init a (a.c:505)
def foo():
AttributeError: 'module' object has no attribute 'foo'

however, if you remove the docstring "bar", it works:

>>> import a
>>>

and in Python, it works both ways. I don't know why anyone would want
to delete a function like that, but in any case, I guess that's a
regression.

Ondrej

Robert Bradshaw

unread,
Sep 28, 2010, 8:04:20 PM9/28/10
to cython...@googlegroups.com

I wonder if this has to do with the auto test dict (which is generated
at runtime). I thought that went in a bit ago though. I'll look into
this. Thanks for the report.

- Robert

Yaroslav Halchenko

unread,
Oct 6, 2010, 10:48:03 AM10/6/10
to cython-users
Hi Robert,

I wonder if you got a chance to look at it?

On Sep 28, 8:04 pm, Robert Bradshaw <rober...@math.washington.edu>
wrote:

Robert Bradshaw

unread,
Oct 6, 2010, 12:35:52 PM10/6/10
to cython...@googlegroups.com
On Wed, Oct 6, 2010 at 7:48 AM, Yaroslav Halchenko <yarik...@gmail.com> wrote:
> Hi Robert,
>
> I wonder if you got a chance to look at it?

No, I haven't yet.

Lisandro Dalcin

unread,
Oct 6, 2010, 1:40:11 PM10/6/10
to cython...@googlegroups.com
On 6 October 2010 11:48, Yaroslav Halchenko <yarik...@gmail.com> wrote:
> Hi Robert,
>
> I wonder if you got a chance to look at it?
>

Could you add the line below to the top level of your pyx source?:

#cython: autotestdict=False

For example, take a look here:
http://code.google.com/p/mpi4py/source/browse/trunk/src/mpi4py.MPI.pyx#4

> On Sep 28, 8:04 pm, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> > as reported here:
>> >http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597848
>> I wonder if this has to do with the auto test dict (which is generated
>> at runtime). I thought that went in a bit ago though. I'll look into
>> this. Thanks for the report.
>

--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169

Yaroslav Halchenko

unread,
Oct 9, 2010, 1:04:54 PM10/9/10
to cython-users, 597...@bugs.debian.org, Debian Python Modules Team
that indeed provides a workaround for the segfault during testing
while building python-djvulibre-0.1.18 !
Reply all
Reply to author
Forward
0 new messages