Re: [Cython] Cython 0.16 Beta 0

2012-03-05 Thread mark florisson
On 5 March 2012 05:41, Arfrever Frehtes Taifersar Arahesis
 wrote:
> All tests pass with Python 2.6 (2.6.7 release).
> All tests pass with Python 2.7 (snapshot of 2.7 branch, revision 
> 52ecec12c0ed).
> 10 failures with Python 3.1 (3.1.4 release).
> 14 failures with Python 3.2 (snapshot of 3.2 branch, revision 4966907d3661).
>
> Failures with Python 3.2:
>
> ==
> FAIL: test_copy_to (memoryviewattrs.__test__)
> Doctest: memoryviewattrs.__test__.test_copy_to
> --
> Traceback (most recent call last):
>  File "/usr/lib64/python3.2/doctest.py", line 2153, in runTest
>    raise self.failureException(self.format_failure(new.getvalue()))
> AssertionError: Failed doctest test for memoryviewattrs.__test__.test_copy_to
>  File 
> "/var/tmp/portage/dev-python/cython-0.16_beta0/work/Cython-0.16.beta0/tests-3.2/run/c/memoryviewattrs.cpython-32.so",
>  line unknown line number, in test_copy_to
>
> --
> File 
> "/var/tmp/portage/dev-python/cython-0.16_beta0/work/Cython-0.16.beta0/tests-3.2/run/c/memoryviewattrs.cpython-32.so",
>  line ?, in memoryviewattrs.__test__.test_copy_to
> Failed example:
>    test_copy_to()
> Expected:
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
> Got:
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
>
>
> ==
> FAIL: test_copy_to (memoryviewattrs.__test__)
> Doctest: memoryviewattrs.__test__.test_copy_to
> --
> Traceback (most recent call last):
>  File "/usr/lib64/python3.2/doctest.py", line 2153, in runTest
>    raise self.failureException(self.format_failure(new.getvalue()))
> AssertionError: Failed doctest test for memoryviewattrs.__test__.test_copy_to
>  File 
> "/var/tmp/portage/dev-python/cython-0.16_beta0/work/Cython-0.16.beta0/tests-3.2/run/cpp/memoryviewattrs.cpython-32.so",
>  line unknown line number, in test_copy_to
>
> --
> File 
> "/var/tmp/portage/dev-python/cython-0.16_beta0/work/Cython-0.16.beta0/tests-3.2/run/cpp/memoryviewattrs.cpython-32.so",
>  line ?, in memoryviewattrs.__test__.test_copy_to
> Failed example:
>    test_copy_to()
> Expected:
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
> Got:
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
>    0 1 2 3 4 5 6 7
>
>
> ==
> FAIL: test_coerce_to_numpy (numpy_memoryview.__test__)
> Doctest: numpy_memoryview.__test__.test_coerce_to_numpy
> --
> Traceback (most recent call last):
>  File "/usr/lib64/python3.2/doctest.py", line 2153, in runTest
>    raise self.failureException(self.format_failure(new.getvalue()))
> AssertionError: Failed doctest test for 
> numpy_memoryview.__test__.test_coerce_to_numpy
>  File 
> "/var/tmp/portage/dev-python/cython-0.16_beta0/work/Cython-0.16.beta0/tests-3.2/run/c/numpy_memoryview.cpython-32.so",
>  line unknown line number, in test_coerce_to_numpy
>
> --
> File 
> "/var/tmp/portage/dev-python/cython-0.16_beta0/work/Cython-0.16.beta0/tests-3.2/run/c/numpy_memoryview.cpython-32.so",
>  line ?, in numpy_memoryview.__test__.test_coerce_to_numpy
> Failed example:
>    test_coerce_to_numpy()
> Expected:
>    (97, 98, 600L, 700, 800)
>    deallocating...
>    (600, 700)
>    deallocating...
>    ((100, 200), (300, 400), 500)
>    deallocating...
>    (97, 900)
>    deallocating...
>    99
>    deallocating...
>    111
>    deallocating...
>    222
>    deallocating...
>    333
>    deallocating...
>    11.1
>    deallocating...
>    12.2
>    deallocating...
>    13.3
>    deallocating...
>    (14.4+15.5j)
>    deallocating...
>    (16.6+17.7j)
>    deallocating...
>    (18.8+19.9j)
>    deallocating...
>    22
>    deallocating...
>    33.33
>    deallocating...
>    44
>    deallocating...
> Got:
>    (97, 98, 600, 700, 800)
>    deallocating...
>    (600, 700)
>    deallocating...
>    ((100, 200), (300, 400), 500)
>    deallocating...
>    (97, 900)
>    deallocating...
>    99
>    deallocating...
>    111
>    deallocating...
>    222
>    deallocating...
>    333
>    deallocating...
>    11.1
>    deallocating...
>    12.2
>    deallocating...
>    13.3
>    deallocating...
>    (14.4+15.5j)
>    deallocating...
>    (16.6+17.7j)
>    deallocating...
>    (18.8+19.9j)
>    deallocating...
>    22
>    deallocating...
>    33.33
>    deallocating...
>    44
>    deallocating...
>
>
> ==
> FAIL: test_memslice_structarray (numpy_memoryview.__test__)
> Doctest: numpy_memoryview.__test__.te

Re: [Cython] PEP 380 approved: syntax for generator delegation

2012-03-05 Thread Stefan Behnel
Vitja Makarov, 27.06.2011 22:31:
> 2011/6/27 Stefan Behnel:
>> PEP 380 ("yield from") recently went through the approval gate.
>>
>> http://www.python.org/dev/peps/pep-0380/
>>
>> The implementation in CPython isn't rounded up yet and lots of tests are
>> missing from the test suite. But it's agreed that it'll make it into 3.3,
>> and we should try to support it as well. It's a really nice feature.
> 
> Wow! Interesting thing.
> I think that could be implemented but I think we should try to
> optimize cython generators first.

Coming back to this, the way it's now implemented in CPython is using a new
field "f_yieldfrom" in the frame that the coroutine implementation
automatically delegates to. Cython's coroutine implementation could do the
same thing, and even copy much of the original implementation, by adding a
new field to the coroutine class and updating the send(), throw() and
close() methods accordingly. The interesting changes are those in
Objects/genobject.c and Python/ceval.c in this patch:

http://bugs.python.org/file24214/f8349cbc1b26.diff

That makes it look like most of the work is done for us already.

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


[Cython] NumFOCUS

2012-03-05 Thread Dag Sverre Seljebotn
To whoever hasn't heard the news already, there's now a NumPy Foundation 
for Open Code for Usable Science:


http://numfocus.org/

Cython is on the "looking for representatives" list (my English fails me 
as to what exactly that means though).


They are seeking US tax-exempt status. So:

 a) Cython users who wants to sponsor development may be able to 
contribute through this organizatin


 b) It's a place Cython devs should keep in mind as a possible source 
of funding for good projects or workshop opportunities (if money can 
help -- which is often not the case, but sometimes)


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


Re: [Cython] NumFOCUS

2012-03-05 Thread William Stein
On Mar 5, 2012 11:02 AM, "Dag Sverre Seljebotn" 
wrote:
>
> To whoever hasn't heard the news already, there's now a NumPy Foundation
for Open Code for Usable Science:
>
> http://numfocus.org/
>
> Cython is on the "looking for representatives" list (my English fails me
as to what exactly that means though).
>
> They are seeking US tax-exempt status. So:
>
>  a) Cython users who wants to sponsor development may be able to
contribute through this organizatin
>
>  b) It's a place Cython devs should keep in mind as a possible source of
funding for good projects or workshop opportunities (if money can help --
which is often not the case, but sometimes)
>

On this topic, keep me in mind too, as I have an NSF grant right now that
can be used for such things.

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