Re: [Cython] GCC 4.6 unused-but-set-variable warnings
2011/7/29 Stefan Behnel : > Vitja Makarov, 29.07.2011 08:38: >> >> 2011/7/29 Vitja Makarov: >>> >>> 2011/7/29 Stefan Behnel: Nikolaus Rath, 13.06.2011 16:59: > > $ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c test.c -o test.o > -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -Werror -Wall -Wextra > -Wconversion -Wno-unused-parameter -Wno-sign-conversion > -fno-strict-aliasing > test.c: > test.c:454:13: warning: variable ‘__pyx_v_exc’ set but not used > [-Wunused-but-set-variable] > test.c:453:13: warning: variable ‘__pyx_v_fn’ set but not used > [-Wunused-but-set-variable] > test.c:452:13: warning: variable ‘__pyx_v_self’ set but not used > [-Wunused-but-set-variable] http://trac.cython.org/cython_trac/ticket/704 I think this is something that the control flow analysis could deal with. Basically, every parameter that turns out to be unused in the function (and this most likely only happens with parameters) could be ignored, unless it requires a type conversion with potential side effects. In that (unlikely) case, we could still drop the final assignment to the variable itself. >>> >>> There is entry.cf_unused flag it's set when the whole entry is not used. >> >> ((6af313c...)) vitja@vitja-laptop:~/work/cython-vitek$ python >> cython.py -X warn.unused_arg=True test.pyx >> warning: test.pyx:2:19: Unused argument 'self' >> warning: test.pyx:2:25: Unused argument 'fn' >> warning: test.pyx:2:29: Unused argument 'exc' > > Cool. That's what I expected. :) > > Want to give it a try? The argument unpacking code has traditionally been my > domain, and it's somewhat complex, but it should still be easy to stick this > in. Note that there is more than one place where this needs to be handled, > as the code is structured into different cases based on the type of > signature. > > Otherwise, I can see if I find a bit of time over the weekend. > I will try to find some time. Btw this issue isn't critical and even isn't a bug at all. -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] GCC 4.6 unused-but-set-variable warnings
Vitja Makarov, 29.07.2011 10:08: this issue isn't critical and even isn't a bug at all. Agreed. It's nothing that needs to be done for 0.15. I just thought you might be interested. :D Stefan ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Cython 0.15 release candidate
On 25 July 2011 08:03, Arfrever Frehtes Taifersar Arahesis wrote: > There are 4 test failures with Python 2.6, 2.7, 3.1 and 3.2. > Output with Python 2.7: > > == > FAIL: test_nested_break_continue (line 331) (parallel.__test__) > Doctest: parallel.__test__.test_nested_break_continue (line 331) > -- > Traceback (most recent call last): > File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for > parallel.__test__.test_nested_break_continue (line 331) > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", > line unknown line number, in test_nested_break_continue (line 331) > > -- > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", > line ?, in parallel.__test__.test_nested_break_continue (line 331) > Failed example: > test_nested_break_continue() > Expected: > 6 7 6 7 > 8 > Got: > 6 0 -1160725808 -1160725808 > 8 > > > == > FAIL: test_propagation (line 49) (parallel.__test__) > Doctest: parallel.__test__.test_propagation (line 49) > -- > Traceback (most recent call last): > File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for parallel.__test__.test_propagation > (line 49) > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", > line unknown line number, in test_propagation (line 49) > > -- > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", > line ?, in parallel.__test__.test_propagation (line 49) > Failed example: > test_propagation() > Expected: > (9, 9, 9, 9, 450, 450) > Got: > (9, 0, 9, -1160725808, 0, 0) > > > == > FAIL: test_nested_break_continue (line 331) (parallel.__test__) > Doctest: parallel.__test__.test_nested_break_continue (line 331) > -- > Traceback (most recent call last): > File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for > parallel.__test__.test_nested_break_continue (line 331) > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", > line unknown line number, in test_nested_break_continue (line 331) > > -- > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", > line ?, in parallel.__test__.test_nested_break_continue (line 331) > Failed example: > test_nested_break_continue() > Expected: > 6 7 6 7 > 8 > Got: > 6 0 -1160725808 -1160725808 > 8 > > > == > FAIL: test_propagation (line 49) (parallel.__test__) > Doctest: parallel.__test__.test_propagation (line 49) > -- > Traceback (most recent call last): > File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for parallel.__test__.test_propagation > (line 49) > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", > line unknown line number, in test_propagation (line 49) > > -- > File > "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", > line ?, in parallel.__test__.test_propagation (line 49) > Failed example: > test_propagation() > Expected: > (9, 9, 9, 9, 450, 450) > Got: > (9, 0, 9, -1160725808, 0, 0) > > > -- > Ran 5554 tests in 1509.246s > > FAILED (failures=4) > ALL DONE > > -- > Arfrever Frehtes Taifersar Arahesis > > ___ > Cython-dev mailing list > cython-...@codespeak.net > http://codespeak.net/mailman/listinfo/cython-dev > > Unfortunately due to a bug in gcc 4.5, Dag and I have concluded that we must disable nested parallelism support in Cython, as there is no suitable workaround. (The
Re: [Cython] GCC 4.6 unused-but-set-variable warnings
2011/7/29 Stefan Behnel : > Vitja Makarov, 29.07.2011 10:08: >> >> this issue isn't critical and even isn't a bug at all. > > Agreed. It's nothing that needs to be done for 0.15. I just thought you > might be interested. :D > Yeah, I tried to do this once but I've found some problems with buffer variables. What to do about local variables: def foo(): a = 1 'a' is unused here -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] GCC 4.6 unused-but-set-variable warnings
Vitja Makarov, 29.07.2011 10:44: 2011/7/29 Stefan Behnel: Vitja Makarov, 29.07.2011 10:08: this issue isn't critical and even isn't a bug at all. Agreed. It's nothing that needs to be done for 0.15. I just thought you might be interested. :D Yeah, I tried to do this once but I've found some problems with buffer variables. What to do about local variables: def foo(): a = 1 'a' is unused here That's up to the user to fix. However, there may be restrictions regarding the signature (inheritance etc.) that the users cannot control, so unused *parameters* must not produce warnings. Stefan ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] GCC 4.6 unused-but-set-variable warnings
2011/7/29 Stefan Behnel : > Vitja Makarov, 29.07.2011 10:44: >> >> 2011/7/29 Stefan Behnel: >>> >>> Vitja Makarov, 29.07.2011 10:08: this issue isn't critical and even isn't a bug at all. >>> >>> Agreed. It's nothing that needs to be done for 0.15. I just thought you >>> might be interested. :D >>> >> >> Yeah, I tried to do this once but I've found some problems with buffer >> variables. >> >> What to do about local variables: >> >> def foo(): >> a = 1 >> >> 'a' is unused here > > That's up to the user to fix. However, there may be restrictions regarding > the signature (inheritance etc.) that the users cannot control, so unused > *parameters* must not produce warnings. > Sure. Because of that there is separate warn.unused_args option :) -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] GCC 4.6 unused-but-set-variable warnings
Vitja Makarov, 29.07.2011 10:55: 2011/7/29 Stefan Behnel: Vitja Makarov, 29.07.2011 10:44: 2011/7/29 Stefan Behnel: Vitja Makarov, 29.07.2011 10:08: this issue isn't critical and even isn't a bug at all. Agreed. It's nothing that needs to be done for 0.15. I just thought you might be interested. :D Yeah, I tried to do this once but I've found some problems with buffer variables. What to do about local variables: def foo(): a = 1 'a' is unused here That's up to the user to fix. However, there may be restrictions regarding the signature (inheritance etc.) that the users cannot control, so unused *parameters* must not produce warnings. Sure. Because of that there is separate warn.unused_args option :) With the caveat that gcc 4.6 produces a warning with -Wall for them, because it cannot know that they originally were parameters in the Cython code. Stefan ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Cython 0.15 release candidate
2011-07-26 13:00:10 mark florisson napisał(a): > Unfortunately the output of the testrunner is rather useless here. > Could you run the tests with --no-cleanup and attach the .c and .cpp > files (found in build/run/c/numpy_cimport.c, etc)? I think something > is up with your numpy version and headers. The numpy tests should be > automatically skipped if numpy is not available. I have found the following lines in earlier part of output: runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In function ‘PyInit_numpy_bufacc_T155’: numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function returning non-void numpy_bufacc_T155 () Doctest: numpy_bufacc_T155 ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_cimport ... numpy_cimport.c: In function ‘PyInit_numpy_cimport’: numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function returning non-void numpy_cimport () Doctest: numpy_cimport ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_cimport ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: numpy_cimport.cpp:3327:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_parallel ... numpy_parallel.c: In function ‘PyInit_numpy_parallel’: numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function returning non-void test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_parallel ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: numpy_parallel.cpp:3824:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_test ... numpy_test.c: In function ‘PyInit_numpy_test’: numpy_test.c:11604:5: warning: ‘return’ with no value, in function returning non-void numpy_test () Doctest: numpy_test ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_test ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: numpy_test.cpp:11604:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR Relevant source files: http://people.apache.org/~Arfrever/numpy_bufacc_T155.c http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp http://people.apache.org/~Arfrever/numpy_cimport.c http://people.apache.org/~Arfrever/numpy_cimport.cpp http://people.apache.org/~Arfrever/numpy_parallel.c http://people.apache.org/~Arfrever/numpy_parallel.cpp http://people.apache.org/~Arfrever/numpy_test.c http://people.apache.org/~Arfrever/numpy_test.cpp -- Arfrever Frehtes Taifersar Arahesis signature.asc Description: This is a digitally signed message part. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Cython 0.15 release candidate
On Fri, Jul 29, 2011 at 1:33 AM, mark florisson wrote: > On 25 July 2011 08:03, Arfrever Frehtes Taifersar Arahesis > wrote: >> There are 4 test failures with Python 2.6, 2.7, 3.1 and 3.2. >> Output with Python 2.7: >> >> == >> FAIL: test_nested_break_continue (line 331) (parallel.__test__) >> Doctest: parallel.__test__.test_nested_break_continue (line 331) >> -- >> Traceback (most recent call last): >> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >> raise self.failureException(self.format_failure(new.getvalue())) >> AssertionError: Failed doctest test for >> parallel.__test__.test_nested_break_continue (line 331) >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >> line unknown line number, in test_nested_break_continue (line 331) >> >> -- >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >> line ?, in parallel.__test__.test_nested_break_continue (line 331) >> Failed example: >> test_nested_break_continue() >> Expected: >> 6 7 6 7 >> 8 >> Got: >> 6 0 -1160725808 -1160725808 >> 8 >> >> >> == >> FAIL: test_propagation (line 49) (parallel.__test__) >> Doctest: parallel.__test__.test_propagation (line 49) >> -- >> Traceback (most recent call last): >> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >> raise self.failureException(self.format_failure(new.getvalue())) >> AssertionError: Failed doctest test for parallel.__test__.test_propagation >> (line 49) >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >> line unknown line number, in test_propagation (line 49) >> >> -- >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >> line ?, in parallel.__test__.test_propagation (line 49) >> Failed example: >> test_propagation() >> Expected: >> (9, 9, 9, 9, 450, 450) >> Got: >> (9, 0, 9, -1160725808, 0, 0) >> >> >> == >> FAIL: test_nested_break_continue (line 331) (parallel.__test__) >> Doctest: parallel.__test__.test_nested_break_continue (line 331) >> -- >> Traceback (most recent call last): >> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >> raise self.failureException(self.format_failure(new.getvalue())) >> AssertionError: Failed doctest test for >> parallel.__test__.test_nested_break_continue (line 331) >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >> line unknown line number, in test_nested_break_continue (line 331) >> >> -- >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >> line ?, in parallel.__test__.test_nested_break_continue (line 331) >> Failed example: >> test_nested_break_continue() >> Expected: >> 6 7 6 7 >> 8 >> Got: >> 6 0 -1160725808 -1160725808 >> 8 >> >> >> == >> FAIL: test_propagation (line 49) (parallel.__test__) >> Doctest: parallel.__test__.test_propagation (line 49) >> -- >> Traceback (most recent call last): >> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >> raise self.failureException(self.format_failure(new.getvalue())) >> AssertionError: Failed doctest test for parallel.__test__.test_propagation >> (line 49) >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >> line unknown line number, in test_propagation (line 49) >> >> -- >> File >> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >> line ?, in parallel.__test__.test_propagation (line 49) >> Failed example: >> test_propagation() >> Expected: >> (9, 9, 9, 9, 450, 450) >> Got: >> (9, 0, 9, -1160725808, 0, 0) >> >> >> -- >> Ran 5554 tests in 1509.246s >> >> FAILED (failures=4) >> ALL DONE >> >> -- >> Arfrever Frehtes Taifersar Arahesis >> >> ___ >> Cython-dev mailing list >> cython-...@codespeak.net >> http://codespeak.net/mailman/listinfo
Re: [Cython] Should we drop support for CPython 2.3? (and maybe even 2.4?)
On Wed, Jul 27, 2011 at 11:32 PM, Vitja Makarov wrote: > 2011/7/28 Stefan Behnel : >> Robert Bradshaw, 27.07.2011 20:28: >>> >>> Yes, that is a good point, though if it's (really) easy, I'd rather >>> say "this is the last release supporting 2.3" rather than "oh, btw, we >>> dropped support for 2.3." >> >> I wouldn't mind either way. Let's see what the users poll gives. >> >> >>> I also think we should have a big fat #error rather than letting 2.3 >>> support just fade away (or worse, silently produce bad/incorrect >>> code). >> >> With "fading out" I just meant that a) we don't even know right now if the C >> code we generate really works in Python 2.3 and b) we could just leave it >> that way and add a note to the release notes that it's no longer actively >> supported but on a "I feel lucky" basis. >> >> But I agree that it's better to let the C compilation fail loudly, so that >> users know what the problem is. >> > > That could be a warning not an error. > > It's fun: with cython you can use decorators, generators and more with py2.3, > may be it's better to drop support after 0.15? > > I hope it would be easy to fix this error: > https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests-py23-c/871/console I'll look into it. If it's trivial I'll fix it and we'll call 2.3 supported, if not we'll not worry about it. In general, it sounds like people are fine with dropping support for 2.3, and we've got one request for holding onto 2.4 a little bit longer (but dropping that is on the horizon too). - Robert ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Cython 0.15 release candidate
On 29 July 2011 20:06, Robert Bradshaw wrote: > On Fri, Jul 29, 2011 at 1:33 AM, mark florisson > wrote: >> On 25 July 2011 08:03, Arfrever Frehtes Taifersar Arahesis >> wrote: >>> There are 4 test failures with Python 2.6, 2.7, 3.1 and 3.2. >>> Output with Python 2.7: >>> >>> == >>> FAIL: test_nested_break_continue (line 331) (parallel.__test__) >>> Doctest: parallel.__test__.test_nested_break_continue (line 331) >>> -- >>> Traceback (most recent call last): >>> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >>> raise self.failureException(self.format_failure(new.getvalue())) >>> AssertionError: Failed doctest test for >>> parallel.__test__.test_nested_break_continue (line 331) >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >>> line unknown line number, in test_nested_break_continue (line 331) >>> >>> -- >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >>> line ?, in parallel.__test__.test_nested_break_continue (line 331) >>> Failed example: >>> test_nested_break_continue() >>> Expected: >>> 6 7 6 7 >>> 8 >>> Got: >>> 6 0 -1160725808 -1160725808 >>> 8 >>> >>> >>> == >>> FAIL: test_propagation (line 49) (parallel.__test__) >>> Doctest: parallel.__test__.test_propagation (line 49) >>> -- >>> Traceback (most recent call last): >>> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >>> raise self.failureException(self.format_failure(new.getvalue())) >>> AssertionError: Failed doctest test for parallel.__test__.test_propagation >>> (line 49) >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >>> line unknown line number, in test_propagation (line 49) >>> >>> -- >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", >>> line ?, in parallel.__test__.test_propagation (line 49) >>> Failed example: >>> test_propagation() >>> Expected: >>> (9, 9, 9, 9, 450, 450) >>> Got: >>> (9, 0, 9, -1160725808, 0, 0) >>> >>> >>> == >>> FAIL: test_nested_break_continue (line 331) (parallel.__test__) >>> Doctest: parallel.__test__.test_nested_break_continue (line 331) >>> -- >>> Traceback (most recent call last): >>> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >>> raise self.failureException(self.format_failure(new.getvalue())) >>> AssertionError: Failed doctest test for >>> parallel.__test__.test_nested_break_continue (line 331) >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >>> line unknown line number, in test_nested_break_continue (line 331) >>> >>> -- >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >>> line ?, in parallel.__test__.test_nested_break_continue (line 331) >>> Failed example: >>> test_nested_break_continue() >>> Expected: >>> 6 7 6 7 >>> 8 >>> Got: >>> 6 0 -1160725808 -1160725808 >>> 8 >>> >>> >>> == >>> FAIL: test_propagation (line 49) (parallel.__test__) >>> Doctest: parallel.__test__.test_propagation (line 49) >>> -- >>> Traceback (most recent call last): >>> File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest >>> raise self.failureException(self.format_failure(new.getvalue())) >>> AssertionError: Failed doctest test for parallel.__test__.test_propagation >>> (line 49) >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >>> line unknown line number, in test_propagation (line 49) >>> >>> -- >>> File >>> "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", >>> line ?, in parallel.__test__.test_propagation (line 49) >>> Failed example: >>> test_propagation() >>> Expected: >>> (9, 9, 9, 9, 450, 450) >>> Got: >>> (9, 0, 9, -1160725808, 0, 0) >>> >>> >>> -- >>> Ran 5554 tests in 1509.246s >>> >>> FAILED (failures=4) >>> ALL DONE >>> >>> -- >>> Arfrever Frehtes
Re: [Cython] Cython 0.15 release candidate
On 29 July 2011 19:18, Arfrever Frehtes Taifersar Arahesis wrote: > 2011-07-26 13:00:10 mark florisson napisał(a): >> Unfortunately the output of the testrunner is rather useless here. >> Could you run the tests with --no-cleanup and attach the .c and .cpp >> files (found in build/run/c/numpy_cimport.c, etc)? I think something >> is up with your numpy version and headers. The numpy tests should be >> automatically skipped if numpy is not available. > > I have found the following lines in earlier part of output: > > runTest (__main__.CythonRunTestCase) > compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In > function ‘PyInit_numpy_bufacc_T155’: > numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function > returning non-void > numpy_bufacc_T155 () > Doctest: numpy_bufacc_T155 ... ok > runTest (__main__.CythonRunTestCase) > compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command > line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: > numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in > function returning ‘PyObject*’ > ERROR > runTest (__main__.CythonRunTestCase) > compiling (c) and running numpy_cimport ... numpy_cimport.c: In function > ‘PyInit_numpy_cimport’: > numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function > returning non-void > numpy_cimport () > Doctest: numpy_cimport ... ok > runTest (__main__.CythonRunTestCase) > compiling (cpp) and running numpy_cimport ... cc1plus: warning: command line > option "-Wpointer-sign" is valid for C/ObjC but not for C++ > numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: > numpy_cimport.cpp:3327:5: error: return-statement with no value, in function > returning ‘PyObject*’ > ERROR > runTest (__main__.CythonRunTestCase) > compiling (c) and running numpy_parallel ... numpy_parallel.c: In function > ‘PyInit_numpy_parallel’: > numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function > returning non-void > test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) > Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok > runTest (__main__.CythonRunTestCase) > compiling (cpp) and running numpy_parallel ... cc1plus: warning: command line > option "-Wpointer-sign" is valid for C/ObjC but not for C++ > numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: > numpy_parallel.cpp:3824:5: error: return-statement with no value, in function > returning ‘PyObject*’ > ERROR > runTest (__main__.CythonRunTestCase) > compiling (c) and running numpy_test ... numpy_test.c: In function > ‘PyInit_numpy_test’: > numpy_test.c:11604:5: warning: ‘return’ with no value, in function returning > non-void > numpy_test () > Doctest: numpy_test ... ok > runTest (__main__.CythonRunTestCase) > compiling (cpp) and running numpy_test ... cc1plus: warning: command line > option "-Wpointer-sign" is valid for C/ObjC but not for C++ > numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: > numpy_test.cpp:11604:5: error: return-statement with no value, in function > returning ‘PyObject*’ > ERROR > > Relevant source files: > > http://people.apache.org/~Arfrever/numpy_bufacc_T155.c > http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp > http://people.apache.org/~Arfrever/numpy_cimport.c > http://people.apache.org/~Arfrever/numpy_cimport.cpp > http://people.apache.org/~Arfrever/numpy_parallel.c > http://people.apache.org/~Arfrever/numpy_parallel.cpp > http://people.apache.org/~Arfrever/numpy_test.c > http://people.apache.org/~Arfrever/numpy_test.cpp > > -- > Arfrever Frehtes Taifersar Arahesis > > ___ > cython-devel mailing list > cython-devel@python.org > http://mail.python.org/mailman/listinfo/cython-devel > > The compiler complains about the init function of the module, not sure why, but the line numbers don't seem to correspond with the files you provided. The tests run fine for me on both osx, fedora, and ubuntu, all with different gcc versions, so I'm assuming something is wrong with your setup. Thanks for your report though! Feel free to retry using the latest checkout from master (https://github.com/cython/cython). Robert, I'm done with documentation and updates. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Cython 0.15 release candidate
On Fri, Jul 29, 2011 at 11:24 AM, mark florisson wrote: > On 29 July 2011 20:06, Robert Bradshaw wrote: >> On Fri, Jul 29, 2011 at 1:33 AM, mark florisson >> wrote: >>> On 25 July 2011 08:03, Arfrever Frehtes Taifersar Arahesis >>> wrote: There are 4 test failures with Python 2.6, 2.7, 3.1 and 3.2. Output with Python 2.7: == FAIL: test_nested_break_continue (line 331) (parallel.__test__) Doctest: parallel.__test__.test_nested_break_continue (line 331) -- Traceback (most recent call last): File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_nested_break_continue (line 331) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", line unknown line number, in test_nested_break_continue (line 331) -- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", line ?, in parallel.__test__.test_nested_break_continue (line 331) Failed example: test_nested_break_continue() Expected: 6 7 6 7 8 Got: 6 0 -1160725808 -1160725808 8 == FAIL: test_propagation (line 49) (parallel.__test__) Doctest: parallel.__test__.test_propagation (line 49) -- Traceback (most recent call last): File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_propagation (line 49) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", line unknown line number, in test_propagation (line 49) -- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/c/parallel.so", line ?, in parallel.__test__.test_propagation (line 49) Failed example: test_propagation() Expected: (9, 9, 9, 9, 450, 450) Got: (9, 0, 9, -1160725808, 0, 0) == FAIL: test_nested_break_continue (line 331) (parallel.__test__) Doctest: parallel.__test__.test_nested_break_continue (line 331) -- Traceback (most recent call last): File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_nested_break_continue (line 331) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", line unknown line number, in test_nested_break_continue (line 331) -- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", line ?, in parallel.__test__.test_nested_break_continue (line 331) Failed example: test_nested_break_continue() Expected: 6 7 6 7 8 Got: 6 0 -1160725808 -1160725808 8 == FAIL: test_propagation (line 49) (parallel.__test__) Doctest: parallel.__test__.test_propagation (line 49) -- Traceback (most recent call last): File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_propagation (line 49) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", line unknown line number, in test_propagation (line 49) -- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-2.7/run/cpp/parallel.so", line ?, in parallel.__test__.test_propagation (line 49) Failed example: test_propagation() Expected: (9, 9, 9, 9, 450, 450) Got: (9, 0, 9, -1160725808, 0, 0) -
Re: [Cython] Cython 0.15 release candidate
2011-07-29 20:51:11 mark florisson napisał(a): > On 29 July 2011 19:18, Arfrever Frehtes Taifersar Arahesis > wrote: > > 2011-07-26 13:00:10 mark florisson napisał(a): > >> Unfortunately the output of the testrunner is rather useless here. > >> Could you run the tests with --no-cleanup and attach the .c and .cpp > >> files (found in build/run/c/numpy_cimport.c, etc)? I think something > >> is up with your numpy version and headers. The numpy tests should be > >> automatically skipped if numpy is not available. > > > > I have found the following lines in earlier part of output: > > > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In > > function ‘PyInit_numpy_bufacc_T155’: > > numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function > > returning non-void > > numpy_bufacc_T155 () > > Doctest: numpy_bufacc_T155 ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command > > line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: > > numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in > > function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_cimport ... numpy_cimport.c: In function > > ‘PyInit_numpy_cimport’: > > numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function > > returning non-void > > numpy_cimport () > > Doctest: numpy_cimport ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_cimport ... cc1plus: warning: command > > line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: > > numpy_cimport.cpp:3327:5: error: return-statement with no value, in > > function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_parallel ... numpy_parallel.c: In function > > ‘PyInit_numpy_parallel’: > > numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function > > returning non-void > > test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) > > Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_parallel ... cc1plus: warning: command > > line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: > > numpy_parallel.cpp:3824:5: error: return-statement with no value, in > > function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_test ... numpy_test.c: In function > > ‘PyInit_numpy_test’: > > numpy_test.c:11604:5: warning: ‘return’ with no value, in function > > returning non-void > > numpy_test () > > Doctest: numpy_test ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_test ... cc1plus: warning: command line > > option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: > > numpy_test.cpp:11604:5: error: return-statement with no value, in function > > returning ‘PyObject*’ > > ERROR > > > > Relevant source files: > > > > http://people.apache.org/~Arfrever/numpy_bufacc_T155.c > > http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp > > http://people.apache.org/~Arfrever/numpy_cimport.c > > http://people.apache.org/~Arfrever/numpy_cimport.cpp > > http://people.apache.org/~Arfrever/numpy_parallel.c > > http://people.apache.org/~Arfrever/numpy_parallel.cpp > > http://people.apache.org/~Arfrever/numpy_test.c > > http://people.apache.org/~Arfrever/numpy_test.cpp > > The compiler complains about the init function of the module, not sure > why, but the line numbers don't seem to correspond with the files you > provided. The tests run fine for me on both osx, fedora, and ubuntu, > all with different gcc versions, so I'm assuming something is wrong > with your setup. Actually line numbers correspond to the files provided by me. You probably tested with Python 2 instead of Python 3. The files generated by Cython contain this line: import_umath(); numpy/__ufunc_api.h defines (see 'return' at the end): #define import_umath() { UFUNC_NOFPE if (_import_umath() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.umath failed to import"); return; }} pyport.h of Python 2.* defines: #define PyMODINIT_FUNC void pyport.h of Python 3.* defines: #define PyMODINIT_FUNC PyObject* -- Arfrever Frehtes Taifersar Arahesis signature.asc Description: This is a digitally signed message part. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Cython 0.15 release candidate
Looks very much like a numpy-on-py3 bug to me. (NumPy has an RC up currently as well, it'd be good to test them together but don't think I have time this weekend...) Do you know if the problem is there with Cython 0.14? Even if not, it could simply be that the test cases now exercise more of NumPy and nothing to do with Cython... Try copying over the numpy test cases from 0.15 and run them with Cython 0.14 perhaps (sorry that I don't have time to look into this myself now). At any rate, I think this is unlikely to be a Cython regression. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Arfrever Frehtes Taifersar Arahesis wrote: 2011-07-29 20:51:11 mark florisson napisał(a): > On 29 July 2011 19:18, Arfrever Frehtes Taifersar Arahesis > wrote: > > 2011-07-26 13:00:10 mark florisson napisał(a): > >> Unfortunately the output of the testrunner is rather useless here. > >> Could you run the tests with --no-cleanup and attach the .c and .cpp > >> files (found in build/run/c/numpy_cimport.c, etc)? I think something > >> is up with your numpy version and headers. The numpy tests should be > >> automatically skipped if numpy is not available. > > > > I have found the following lines in earlier part of output: > > > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In function ‘PyInit_numpy_bufacc_T155’: > > numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function returning non-void > > numpy_bufacc_T155 () > > Doctest: numpy_bufacc_T155 ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: > > numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_cimport ... numpy_cimport.c: In function ‘PyInit_numpy_cimport’: > > numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function returning non-void > > numpy_cimport () > > Doctest: numpy_cimport ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_cimport ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: > > numpy_cimport.cpp:3327:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_parallel ... numpy_parallel.c: In function ‘PyInit_numpy_parallel’: > > numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function returning non-void > > test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) > > Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_parallel ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: > > numpy_parallel.cpp:3824:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_test ... numpy_test.c: In function ‘PyInit_numpy_test’: > > numpy_test.c:11604:5: warning: ‘return’ with no value, in function returning non-void > > numpy_test () > > Doctest: numpy_test ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_test ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: > > numpy_test.cpp:11604:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > > > Relevant source files: > > > > http://people.apache.org/~Arfrever/numpy_bufacc_T155.c > > http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp > > http://people.apache.org/~Arfrever/numpy_cimport.c > > http://people.apache.org/~Arfrever/numpy_cimport.cpp > > http://people.apache.org/~Arfrever/numpy_parallel.c > > http://people.apache.org/~Arfrever/numpy_parallel.cpp > > http://people.apache.org/~Arfrever/numpy_test.c > > http://people.apache.org/~Arfrever/numpy_test.cpp > > The compiler complains about the init function of the module, not su re > why, but the line numbers don't seem to correspond with the files you > provided. The tests run fine for me on both osx, fedora, and ubuntu, > all with different gcc versions, so I'm assuming something is wrong > with your setup. Actually line numbers correspond to the files provided by me. You probably tested with Python 2 instead of Python 3. The files generated by Cython conta