Hi, I uploaded a first alpha release of Cython 0.21. http://cython.org/release/Cython-0.21a1.tar.gz http://cython.org/release/Cython-0.21a1.tar.gz.asc There were a couple of major changes in this version, including internal improvements to some basic syntax structures, so please give it a try with your code to help us fix some more bugs before the final release. Complete changelog: https://github.com/cython/cython/blob/deb348795f79342843e692358140ea45819856... Have fun, Stefan
Hi all, given the overwhelming lack of negative feedback on the latest alpha release, and the recent changes that made it into the master branch, I think it's time for a first beta release. http://www.cython.org/release/Cython-0.21b1.tar.gz http://www.cython.org/release/Cython-0.21b1.tar.gz.asc This release features faster calls to C implemented Python functions and methods in simple (non-kwargs) cases, so you might see a net win if your code calls a lot into previously unoptimised builtins or other native extension modules (including Cython modules). There's also a bit of a speedup for Python method calls in general, in addition to the long list of improvements that were already in the last alpha. Complete changelog: https://github.com/cython/cython/blob/ebafd54916e1fe976a282e77b4d59577c793bf... Please give it a try with your code. Any regressions that you find now have a chance of being fixed before the final release. Positive success stories are also appreciated. Have fun, Stefan
Results of test suite of Cython 0.21 beta 1 with different versions of Python: Python 2.6: 1 error, 2 failures Python 2.7: 1 error, 0 failures Python 3.2: 1 error, 0 failures Python 3.3: 1 error, 0 failures Python 3.4: 1 error, 0 failures The 1 error is the same with all versions of Python. Output with Python 2.6: ====================================================================== ERROR: compiling (c) and running bufaccess ---------------------------------------------------------------------- Traceback (most recent call last): File "runtests.py", line 1022, in run check_thread_termination() File "runtests.py", line 1633, in check_thread_termination raise PendingThreadsError("left-over threads found after running test") PendingThreadsError: left-over threads found after running test ====================================================================== FAIL: Doctest: double_dealloc_T796 ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.6/doctest.py", line 2163, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for double_dealloc_T796 File "/tmp/Cython-0.21b1/tests-2.6/run/c/double_dealloc_T796/double_dealloc_T796.so", line unknown line number, in double_dealloc_T796 ---------------------------------------------------------------------- File "/tmp/Cython-0.21b1/tests-2.6/run/c/double_dealloc_T796/double_dealloc_T796.so", line ?, in double_dealloc_T796 Failed example: del x Expected: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 0 Got: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 128 ====================================================================== FAIL: Doctest: double_dealloc_T796 ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.6/doctest.py", line 2163, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for double_dealloc_T796 File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line unknown line number, in double_dealloc_T796 ---------------------------------------------------------------------- File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line ?, in double_dealloc_T796 Failed example: del x Expected: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 0 Got: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 128 ---------------------------------------------------------------------- Ran 8832 tests in 6785.081s FAILED (failures=2, errors=1) ALL DONE -- Arfrever Frehtes Taifersar Arahesis
Hi, thanks for testing. Arfrever Frehtes Taifersar Arahesis schrieb am 14.08.2014 um 10:18:
Results of test suite of Cython 0.21 beta 1 with different versions of Python: Python 2.6: 1 error, 2 failures Python 2.7: 1 error, 0 failures Python 3.2: 1 error, 0 failures Python 3.3: 1 error, 0 failures Python 3.4: 1 error, 0 failures
The 1 error is the same with all versions of Python. Output with Python 2.6:
====================================================================== ERROR: compiling (c) and running bufaccess ---------------------------------------------------------------------- Traceback (most recent call last): File "runtests.py", line 1022, in run check_thread_termination() File "runtests.py", line 1633, in check_thread_termination raise PendingThreadsError("left-over threads found after running test") PendingThreadsError: left-over threads found after running test
======================================================================
There should be some output in the log where the test is run that shows what threads are still running here. Could you look that up?
====================================================================== FAIL: Doctest: double_dealloc_T796 ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.6/doctest.py", line 2163, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for double_dealloc_T796 File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line unknown line number, in double_dealloc_T796
---------------------------------------------------------------------- File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line ?, in double_dealloc_T796 Failed example: del x Expected: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 0 Got: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 128
This might just be a problem with the test. Does this patch help? ========================================= diff -r f7b5d79a04e6 -r e2f2cf8efcc7 tests/run/double_dealloc_T796.pyx --- a/tests/run/double_dealloc_T796.pyx Thu Aug 28 20:21:14 2014 +0200 +++ b/tests/run/double_dealloc_T796.pyx Thu Aug 28 20:31:06 2014 +0200 @@ -1,4 +1,5 @@ """ +>>> gc.collect()
x = SimpleGarbage() SimpleGarbage(1) __cinit__ del x =========================================
Stefan
2014-08-28 20:39 Stefan Behnel napisał(a):
Arfrever Frehtes Taifersar Arahesis schrieb am 14.08.2014 um 10:18:
Results of test suite of Cython 0.21 beta 1 with different versions of Python: Python 2.6: 1 error, 2 failures Python 2.7: 1 error, 0 failures Python 3.2: 1 error, 0 failures Python 3.3: 1 error, 0 failures Python 3.4: 1 error, 0 failures
The 1 error is the same with all versions of Python. Output with Python 2.6:
====================================================================== ERROR: compiling (c) and running bufaccess ---------------------------------------------------------------------- Traceback (most recent call last): File "runtests.py", line 1022, in run check_thread_termination() File "runtests.py", line 1633, in check_thread_termination raise PendingThreadsError("left-over threads found after running test") PendingThreadsError: left-over threads found after running test
======================================================================
There should be some output in the log where the test is run that shows what threads are still running here. Could you look that up?
Output for Cython 0.21 beta 2: compiling (c) and running bufaccess ... Doctest: bufaccess.__test__.acquire_failure1 ... ok Doctest: bufaccess.__test__.acquire_failure2 ... ok Doctest: bufaccess.__test__.acquire_failure3 ... ok Doctest: bufaccess.__test__.acquire_failure4 ... ok Doctest: bufaccess.__test__.acquire_failure5 ... ok Doctest: bufaccess.__test__.acquire_nonbuffer1 ... ok Doctest: bufaccess.__test__.acquire_nonbuffer2 ... ok Doctest: bufaccess.__test__.acquire_raise ... ok Doctest: bufaccess.__test__.acquire_release ... ok Doctest: bufaccess.__test__.as_argument ... ok Doctest: bufaccess.__test__.as_argument_defval ... ok Doctest: bufaccess.__test__.as_argument_not_none ... ok Doctest: bufaccess.__test__.assign_temporary_to_object ... ok Doctest: bufaccess.__test__.assign_to_object ... ok Doctest: bufaccess.__test__.basic_struct ... ok Doctest: bufaccess.__test__.bufdefaults1 ... ok Doctest: bufaccess.__test__.buffer_cast ... ok Doctest: bufaccess.__test__.buffer_cast_fails ... ok Doctest: bufaccess.__test__.buffer_nogil ... ok Doctest: bufaccess.__test__.buffer_nogil_oob ... ok Doctest: bufaccess.__test__.c_contig ... ok Doctest: bufaccess.__test__.c_contig_2d ... ok Doctest: bufaccess.__test__.cascaded_buffer_assignment ... ok Doctest: bufaccess.__test__.cdef_assignment ... ok Doctest: bufaccess.__test__.complex_dtype ... ok Doctest: bufaccess.__test__.complex_inplace ... ok Doctest: bufaccess.__test__.complex_struct_dtype ... ok Doctest: bufaccess.__test__.complex_struct_inplace ... ok Doctest: bufaccess.__test__.explicitly_release_buffer ... ok Doctest: bufaccess.__test__.f_contig ... ok Doctest: bufaccess.__test__.f_contig_2d ... ok Doctest: bufaccess.__test__.forin_assignment ... ok Doctest: bufaccess.__test__.get_int_2d ... ok Doctest: bufaccess.__test__.get_int_2d_uintindex ... ok Doctest: bufaccess.__test__.inplace_operators ... ok Doctest: bufaccess.__test__.list_comprehension ... ok Doctest: bufaccess.__test__.mixed_get ... ok Doctest: bufaccess.__test__.nested_packed_struct ... ok Doctest: bufaccess.__test__.nested_struct ... ok Doctest: bufaccess.__test__.no_negative_indices ... ok Doctest: bufaccess.__test__.packed_struct ... ok Doctest: bufaccess.__test__.printbuf_float ... ok Doctest: bufaccess.__test__.printbuf_int_2d ... ok Doctest: bufaccess.__test__.printbuf_object ... ok Doctest: bufaccess.__test__.printbuf_td_cy_int ... ok Doctest: bufaccess.__test__.printbuf_td_h_cy_short ... ok Doctest: bufaccess.__test__.printbuf_td_h_double ... ok Doctest: bufaccess.__test__.printbuf_td_h_short ... ok Doctest: bufaccess.__test__.printbuf_td_h_ushort ... ok Doctest: bufaccess.__test__.readonly ... ok Doctest: bufaccess.__test__.safe_get ... ok Doctest: bufaccess.__test__.set_int_2d ... ok Doctest: bufaccess.__test__.strided ... ok Doctest: bufaccess.__test__.test_inplace_assignment ... ok Doctest: bufaccess.__test__.tuple_buffer_assignment1 ... ok Doctest: bufaccess.__test__.tuple_buffer_assignment2 ... ok Doctest: bufaccess.__test__.typedbuffer1 ... ok Doctest: bufaccess.__test__.typedbuffer2 ... ok Doctest: bufaccess.__test__.unsafe_get ... ok Doctest: bufaccess.__test__.unsafe_get_nonegative ... ok Doctest: bufaccess.__test__.wraparound_directive ... ok Doctest: bufaccess.__test__.writable ... ok warning: left-over threads found after running test: ...<HistorySavingThread(Thread-1, started 140020768708352)> ERROR
====================================================================== FAIL: Doctest: double_dealloc_T796 ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.6/doctest.py", line 2163, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for double_dealloc_T796 File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line unknown line number, in double_dealloc_T796
---------------------------------------------------------------------- File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line ?, in double_dealloc_T796 Failed example: del x Expected: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 0 Got: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 128
This might just be a problem with the test. Does this patch help?
========================================= diff -r f7b5d79a04e6 -r e2f2cf8efcc7 tests/run/double_dealloc_T796.pyx --- a/tests/run/double_dealloc_T796.pyx Thu Aug 28 20:21:14 2014 +0200 +++ b/tests/run/double_dealloc_T796.pyx Thu Aug 28 20:31:06 2014 +0200 @@ -1,4 +1,5 @@ """ +>>> gc.collect()
x = SimpleGarbage() SimpleGarbage(1) __cinit__ del x =========================================
This patch does not help (for Cython 0.21 beta 2). -- Arfrever Frehtes Taifersar Arahesis
Hi, thanks again for testing. Arfrever Frehtes Taifersar Arahesis schrieb am 31.08.2014 um 10:29:
2014-08-28 20:39 Stefan Behnel napisał(a):
Arfrever Frehtes Taifersar Arahesis schrieb am 14.08.2014 um 10:18:
Results of test suite of Cython 0.21 beta 1 with different versions of Python: Python 2.6: 1 error, 2 failures Python 2.7: 1 error, 0 failures Python 3.2: 1 error, 0 failures Python 3.3: 1 error, 0 failures Python 3.4: 1 error, 0 failures
The 1 error is the same with all versions of Python. Output with Python 2.6:
====================================================================== ERROR: compiling (c) and running bufaccess ---------------------------------------------------------------------- Traceback (most recent call last): File "runtests.py", line 1022, in run check_thread_termination() File "runtests.py", line 1633, in check_thread_termination raise PendingThreadsError("left-over threads found after running test") PendingThreadsError: left-over threads found after running test
======================================================================
There should be some output in the log where the test is run that shows what threads are still running here. Could you look that up?
Output for Cython 0.21 beta 2:
compiling (c) and running bufaccess ... Doctest: bufaccess.__test__.acquire_failure1 ... ok [...] warning: left-over threads found after running test: ...<HistorySavingThread(Thread-1, started 140020768708352)> ERROR
That's from the IPython tests. It seems to start that thread automatically, don't know if we can do anything about it. In any case, it's not harmful and the rest of the test has passed.
====================================================================== FAIL: Doctest: double_dealloc_T796 ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.6/doctest.py", line 2163, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for double_dealloc_T796 File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line unknown line number, in double_dealloc_T796
---------------------------------------------------------------------- File "/tmp/Cython-0.21b1/tests-2.6/run/cpp/double_dealloc_T796/double_dealloc_T796.so", line ?, in double_dealloc_T796 Failed example: del x Expected: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 0 Got: SimpleGarbage(1) __dealloc__ Collector.__dealloc__ collect 128
This might just be a problem with the test. Does this patch help?
========================================= diff -r f7b5d79a04e6 -r e2f2cf8efcc7 tests/run/double_dealloc_T796.pyx --- a/tests/run/double_dealloc_T796.pyx Thu Aug 28 20:21:14 2014 +0200 +++ b/tests/run/double_dealloc_T796.pyx Thu Aug 28 20:31:06 2014 +0200 @@ -1,4 +1,5 @@ """ +>>> gc.collect()
x = SimpleGarbage() SimpleGarbage(1) __cinit__ del x =========================================
This patch does not help (for Cython 0.21 beta 2).
Then I hope that this fixes it: https://github.com/cython/cython/commit/268810da652f702415a18c846b98ee376df8... Stefan
Stefan Behnel schrieb am 08.09.2014 um 19:51:
Arfrever Frehtes Taifersar Arahesis schrieb am 31.08.2014 um 10:29:
2014-08-28 20:39 Stefan Behnel napisał(a):
Arfrever Frehtes Taifersar Arahesis schrieb am 14.08.2014 um 10:18:
Results of test suite of Cython 0.21 beta 1 with different versions of Python: Python 2.6: 1 error, 2 failures Python 2.7: 1 error, 0 failures Python 3.2: 1 error, 0 failures Python 3.3: 1 error, 0 failures Python 3.4: 1 error, 0 failures
The 1 error is the same with all versions of Python. Output with Python 2.6:
====================================================================== ERROR: compiling (c) and running bufaccess ---------------------------------------------------------------------- Traceback (most recent call last): File "runtests.py", line 1022, in run check_thread_termination() File "runtests.py", line 1633, in check_thread_termination raise PendingThreadsError("left-over threads found after running test") PendingThreadsError: left-over threads found after running test
======================================================================
There should be some output in the log where the test is run that shows what threads are still running here. Could you look that up?
Output for Cython 0.21 beta 2:
compiling (c) and running bufaccess ... Doctest: bufaccess.__test__.acquire_failure1 ... ok [...] warning: left-over threads found after running test: ...<HistorySavingThread(Thread-1, started 140020768708352)> ERROR
That's from the IPython tests. It seems to start that thread automatically, don't know if we can do anything about it.
Seems like we can: https://github.com/cython/cython/commit/33cabb92abe015a3c2ccda136df4fc9ea681... Stefan
Hi, here is a second beta: http://www.cython.org/release/Cython-0.21b2.tar.gz http://www.cython.org/release/Cython-0.21b2.tar.gz.asc Since the last beta, there were a couple of improvements for the new method call optimisation, as well as some fixes (usually noted in the relevant mailing list threads already). We might have forgotten to mention previously that inner functions are supported inside of cdef functions in 0.21, a feature that I consider worth noting (and testing :). Complete changelog: https://github.com/cython/cython/blob/d4b87c6d818406275905c87cf89479bebff53c... This would be a good time to bump any pending bug reports that you think should be considered for this release. Stefan
[ forgot to change the subject to attract attention :) ] Stefan Behnel schrieb am 28.08.2014 um 20:34:
Hi,
here is a second beta:
http://www.cython.org/release/Cython-0.21b2.tar.gz
http://www.cython.org/release/Cython-0.21b2.tar.gz.asc
Since the last beta, there were a couple of improvements for the new method call optimisation, as well as some fixes (usually noted in the relevant mailing list threads already).
We might have forgotten to mention previously that inner functions are supported inside of cdef functions in 0.21, a feature that I consider worth noting (and testing :).
Complete changelog:
https://github.com/cython/cython/blob/d4b87c6d818406275905c87cf89479bebff53c...
This would be a good time to bump any pending bug reports that you think should be considered for this release.
Stefan
participants (2)
-
Arfrever Frehtes Taifersar Arahesis -
Stefan Behnel