Re: [Cython] Cython 0.16

2011-10-30 Thread Stefan Behnel

Robert Bradshaw, 29.10.2011 18:58:

On Sat, Oct 29, 2011 at 7:50 AM, Stefan Behnel wrote:

I still haven't investigated the decorator issue that appeared in the Sage
tests. I think it's related to decorators on module level def functions,
which would suggest that it's best to eventually fix it as part of the
function implementation changes that Vitja has started. But there may still
be a simpler work-around somewhere that I'm not seeing yet.

I basically broke the Sage tests by resolving a bug (593 IIRC), and both
don't currently work together. So, a variant would be to revert my changes
for 0.16 and just leave the bug in, if that keeps us from breaking existing
code for now.

But even leaving that out, the Sage tests look seriously broken currently:

https://sage.math.washington.edu:8091/hudson/view/All/job/sage-tests/lastCompletedBuild/consoleFull


I recently fixed the Sage build (the errors on public api for non
public types broke it). As for those tests, they seem to be related to
name mangling for double-underscore names. Did something change here
recently?


Not exactly recently. I implemented private name mangling for cdef classes, 
but I could swear that that was long before the Sage build started showing 
these failures. At least, I'm surprised to see them now.


Stefan
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Cython 0.16

2011-10-30 Thread mark florisson
On 28 October 2011 21:59, mark florisson  wrote:
> On 28 October 2011 21:55, Robert Bradshaw  
> wrote:
>> With Mark's fused types and memory views going in, I think it's about
>> time for a new release. Thoughts? Anyone want to volunteer to take up
>> the process?
>>
>> - Robert
>> ___
>> cython-devel mailing list
>> cython-devel@python.org
>> http://mail.python.org/mailman/listinfo/cython-devel
>>
>
> That'd be cool. However there are a few outstanding issues:
>    a) the compiler is somewhat slower (possible solution: lazy utility codes)
>    b) there's a potential memory leak problem for memoryviews with
> object dtype that contain themselves, this still needs investigation.
>
> As for a), Stefan mentioned code spending a lot of time in sub.
> Stefan, could you post the code for this that made Cython compile very
> slowly?
>

It seems that NumPy does not support cyclic references, it has
'(traverseproc)0,/* tp_traverse */' in its
source (PyArray_Type is the ndarray right?). Indeed, this code prints
"deallocated!" only if there is no reference cycle:


import numpy

cdef class DeallocateMe(object):
def __dealloc__(self):
print "deallocated!"
a = numpy.arange(20, dtype=numpy.object)
a[10] = DeallocateMe()
a[1] = a # <- try commenting out this line
del a
import gc
gc.collect()

Anyway, I got it to traverse and clear the buffer object and the
memoryview slice struct, so it should work if the buffer exporter
supports cycles.
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel