From James.McPherson at oracle.com Mon Nov 7 02:05:25 2016 From: James.McPherson at oracle.com (James C. McPherson) Date: Mon, 7 Nov 2016 17:05:25 +1000 Subject: [Cython] q re environment for successful test suite run Message-ID: Hi all, I'm building Cython 0.24.1 for Solaris and I'm finding it difficult to get the test suite to run successfully. I've tried several different versions of gcc (4.9, 5.3, 5.4) and Solaris Studio (12.4), but to no avail. For starters, here's the first lot of errors from gcc 5.4 in 32bit mode against python2.7: warning: BUILD/inline/_cython_inline_d1a30658ebea82281640c5ea0e1db57e.pyx:6:4: Unreachable code warning: BUILD/inline/_cython_inline_121fdd47c08e20991f90b2566f9a1705.pyx:6:4: Unreachable code warning: BUILD/inline/_cython_inline_a938867fe92f83497d786ebdab9e4e1d.pyx:7:4: Unreachable code BUILD/inline/_cython_inline_a938867fe92f83497d786ebdab9e4e1d.c: In function '__pyx_pf_5numpy_7ndarray___getbuffer__': BUILD/inline/_cython_inline_a938867fe92f83497d786ebdab9e4e1d.c:1522:50: error: 'NPY_C_CONTIGUOUS' undeclared (first use in this function) __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); ^ BUILD/inline/_cython_inline_a938867fe92f83497d786ebdab9e4e1d.c:1522:50: note: each undeclared identifier is reported only once for each function it appears in BUILD/inline/_cython_inline_a938867fe92f83497d786ebdab9e4e1d.c:1586:50: error: 'NPY_F_CONTIGUOUS' undeclared (first use in this function) __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); ^ When you run the test suite, what combination of compiler(s), python interpreter(s) and CFLAGS/CXXFLAGS are used? Thankyou in advance, James C. McPherson -- Oracle Systems / Solaris / Core https://www.jmcpdotcom.com/blog From yury at shurup.com Sun Nov 13 03:58:15 2016 From: yury at shurup.com (Yury V. Zaytsev) Date: Sun, 13 Nov 2016 09:58:15 +0100 (CET) Subject: [Cython] q re environment for successful test suite run In-Reply-To: References: Message-ID: On Mon, 7 Nov 2016, James C. McPherson wrote: > __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != > ^ > > When you run the test suite, what combination of compiler(s), > python interpreter(s) and CFLAGS/CXXFLAGS are used? So, do you have NumPy installed for this Python version? This particular error seems to result from a NumPy identifier defined in the respective header files, which you don't seem to have available. -- Sincerely yours, Yury V. Zaytsev From James.McPherson at oracle.com Mon Nov 14 02:15:06 2016 From: James.McPherson at oracle.com (James C. McPherson) Date: Mon, 14 Nov 2016 17:15:06 +1000 Subject: [Cython] q re environment for successful test suite run In-Reply-To: References: Message-ID: <2b972809-d6d8-9538-8cb1-d5aca39e4d8e@oracle.com> On 13/11/16 06:58 pm, Yury V. Zaytsev wrote: > On Mon, 7 Nov 2016, James C. McPherson wrote: > >> __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != >> ^ >> >> When you run the test suite, what combination of compiler(s), >> python interpreter(s) and CFLAGS/CXXFLAGS are used? > > So, do you have NumPy installed for this Python version? This particular > error seems to result from a NumPy identifier defined in the respective > header files, which you don't seem to have available. Hi Yury, On each of the test machines I've tried, I've got numpy v1.9 installed. I built Cython with the NumPy deprecation per http://docs.cython.org/en/latest/src/reference/compilation.html#configuring-the-c-build - should I have ignored it? Thankyou, James C. McPherson -- Oracle Systems / Solaris / Core https://www.jmcpdotcom.com/blog From yury at shurup.com Mon Nov 14 13:54:59 2016 From: yury at shurup.com (Yury V. Zaytsev) Date: Mon, 14 Nov 2016 19:54:59 +0100 (CET) Subject: [Cython] q re environment for successful test suite run In-Reply-To: <2b972809-d6d8-9538-8cb1-d5aca39e4d8e@oracle.com> References: <2b972809-d6d8-9538-8cb1-d5aca39e4d8e@oracle.com> Message-ID: On Mon, 14 Nov 2016, James C. McPherson wrote: > On 13/11/16 06:58 pm, Yury V. Zaytsev wrote: >> On Mon, 7 Nov 2016, James C. McPherson wrote: >> >> > __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != >> > ^ >> > >> > When you run the test suite, what combination of compiler(s), >> > python interpreter(s) and CFLAGS/CXXFLAGS are used? >> >> So, do you have NumPy installed for this Python version? This particular >> error seems to result from a NumPy identifier defined in the respective >> header files, which you don't seem to have available. > > On each of the test machines I've tried, I've got numpy v1.9 installed. > > I built Cython with the NumPy deprecation per > http://docs.cython.org/en/latest/src/reference/compilation.html#configuring-the-c-build > > - should I have ignored it? Sorry, from the information that you've provided so far, it's impossible to infer what exactly did you do, how your systems are set up, and why is it that Cython isn't able to find your NumPy headers. I don't have a Solaris machine at hand, but last time I tried to build Cython / NumPy / Python on Solaris it simply worked (it was some 6 years ago and Solaris 10 @ Sun Blade 1000), so it seems that something is not right. Maybe somebody else can lend you a hand... -- Sincerely yours, Yury V. Zaytsev From robertwb at gmail.com Fri Nov 18 02:10:08 2016 From: robertwb at gmail.com (Robert Bradshaw) Date: Thu, 17 Nov 2016 23:10:08 -0800 Subject: [Cython] Cython 0.25.2 Message-ID: I'm preparing another bugfix release. Try it out at https://github.com/cython/cython/archive/966a296ac4e4862dee9a571ee412886ca3c61144.zip From lists at onerussian.com Sat Nov 19 22:39:35 2016 From: lists at onerussian.com (Yaroslav Halchenko) Date: Sat, 19 Nov 2016 22:39:35 -0500 Subject: [Cython] 0.25.1 annotate_html UnicodeDecodeError In-Reply-To: References: Message-ID: <20161120033935.GA23180@onerussian.com> Ran into it while building a package for Debian ====================================================================== FAIL: annotate_html () Doctest: annotate_html ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.5/doctest.py", line 2190, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for annotate_html File "/build/cython-0.25.1/build/work-dir/run/cpp/annotate_html/annotate_html.cpython-35m-x86_64-linux-gnu.so", line 1, in annotate_html ---------------------------------------------------------------------- File "/build/cython-0.25.1/build/work-dir/run/cpp/annotate_html/annotate_html.cpython-35m-x86_64-linux-gnu.so", line 9, in annotate_html Failed example: with open(module_path + '.html') as html_file: html = html_file.read() Exception raised: Traceback (most recent call last): File "/usr/lib/python3.5/doctest.py", line 1321, in __run compileflags, 1), test.globs) File "", line 2, in html = html_file.read() File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 16904: ordinal not in range(128) which then leads also to ---------------------------------------------------------------------- File "/build/cython-0.25.1/build/work-dir/run/cpp/annotate_html/annotate_html.cpython-35m-x86_64-linux-gnu.so", line 13, in annotate_html Failed example: assert re.search('
', html)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "", line 1, in 
        assert re.search('
', html)
    NameError: name 'html' is not defined


I guess some locale setting/assumptions?

btw -- what is the "proper" way to run this doctest alone using
runtests.py?

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        

From lists at onerussian.com  Mon Nov 21 00:36:01 2016
From: lists at onerussian.com (Yaroslav Halchenko)
Date: Mon, 21 Nov 2016 00:36:01 -0500
Subject: [Cython] lshift_int  test failing Re:  Cython 0.25.2
In-Reply-To: 
References: 
Message-ID: <20161121053601.GB23180@onerussian.com>



On Thu, 17 Nov 2016, Robert Bradshaw wrote:

> I'm preparing another bugfix release. Try it out at

> https://github.com/cython/cython/archive/966a296ac4e4862dee9a571ee412886ca3c61144.zip

on some platforms , e.g. armel:
https://buildd.debian.org/status/fetch.php?pkg=cython&arch=armel&ver=0.25.2~b0-1&stamp=1479637337
https://buildd.debian.org/status/fetch.php?pkg=cython&arch=armhf&ver=0.25.2~b0-1&stamp=1479632680
and even 
https://buildd.debian.org/status/fetch.php?pkg=cython&arch=i386&ver=0.25.2~b0-1&stamp=1479619359
(although there it looks even with other additional failure in the test, please checkout):

======================================================================
FAIL: lshift_int (line 137) (pyintop.__test__)
Doctest: pyintop.__test__.lshift_int (line 137)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyintop.__test__.lshift_int (line 137)
  File "/?PKGBUILDDIR?/build/work-dir/3/run/c/pyintop/pyintop.so", line unknown line number, in lshift_int (line 137)

----------------------------------------------------------------------
File "/?PKGBUILDDIR?/build/work-dir/3/run/c/pyintop/pyintop.so", line ?, in pyintop.__test__.lshift_int (line 137)
Failed example:
    (2**28) << 3
Expected:
    2147483648
Got:
    2147483648L
----------------------------------------------------------------------
File "/?PKGBUILDDIR?/build/work-dir/3/run/c/pyintop/pyintop.so", line ?, in pyintop.__test__.lshift_int (line 137)
Failed example:
    (2**30) << 3
Expected:
    8589934592
Got:
    8589934592L


======================================================================
FAIL: lshift_int (line 137) (pyintop.__test__)
Doctest: pyintop.__test__.lshift_int (line 137)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyintop.__test__.lshift_int (line 137)
  File "/?PKGBUILDDIR?/build/work-dir/3/run/cpp/pyintop/pyintop.so", line unknown line number, in lshift_int (line 137)

----------------------------------------------------------------------
File "/?PKGBUILDDIR?/build/work-dir/3/run/cpp/pyintop/pyintop.so", line ?, in pyintop.__test__.lshift_int (line 137)
Failed example:
    (2**28) << 3
Expected:
    2147483648
Got:
    2147483648L
----------------------------------------------------------------------
File "/?PKGBUILDDIR?/build/work-dir/3/run/cpp/pyintop/pyintop.so", line ?, in pyintop.__test__.lshift_int (line 137)
Failed example:
    (2**30) << 3
Expected:
    8589934592
Got:
    8589934592L


----------------------------------------------------------------------
Ran 2377 tests in 4617.354s

FAILED (failures=2)

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        

From jdemeyer at cage.ugent.be  Mon Nov 21 02:07:55 2016
From: jdemeyer at cage.ugent.be (Jeroen Demeyer)
Date: Mon, 21 Nov 2016 08:07:55 +0100
Subject: [Cython] lshift_int test failing Re: Cython 0.25.2
In-Reply-To: <20161121053601.GB23180@onerussian.com>
References: 
 <20161121053601.GB23180@onerussian.com>
Message-ID: <58329D4B.5010903@cage.ugent.be>

On 2016-11-21 06:36, Yaroslav Halchenko wrote:
>
>
> On Thu, 17 Nov 2016, Robert Bradshaw wrote:
>
>> I'm preparing another bugfix release. Try it out at
>
>> https://github.com/cython/cython/archive/966a296ac4e4862dee9a571ee412886ca3c61144.zip
>
> on some platforms , e.g. armel:
> https://buildd.debian.org/status/fetch.php?pkg=cython&arch=armel&ver=0.25.2~b0-1&stamp=1479637337
> https://buildd.debian.org/status/fetch.php?pkg=cython&arch=armhf&ver=0.25.2~b0-1&stamp=1479632680
> and even
> https://buildd.debian.org/status/fetch.php?pkg=cython&arch=i386&ver=0.25.2~b0-1&stamp=1479619359
> (although there it looks even with other additional failure in the test, please checkout):

See https://github.com/cython/cython/issues/1530

From robertwb at math.washington.edu  Tue Nov 22 13:09:00 2016
From: robertwb at math.washington.edu (Robert Bradshaw)
Date: Tue, 22 Nov 2016 10:09:00 -0800
Subject: [Cython] 0.25.1 annotate_html UnicodeDecodeError
In-Reply-To: <20161120033935.GA23180@onerussian.com>
References: 
 <20161120033935.GA23180@onerussian.com>
Message-ID: 

You can run just this test with

python runtests.py annotate_html

Could you also run with --no-cleanup so see what non-ascii characters
appear in the html file?

On Sat, Nov 19, 2016 at 7:39 PM, Yaroslav Halchenko
 wrote:
> Ran into it while building a package for Debian
>
> ======================================================================
> FAIL: annotate_html ()
> Doctest: annotate_html
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/doctest.py", line 2190, in runTest
>     raise self.failureException(self.format_failure(new.getvalue()))
> AssertionError: Failed doctest test for annotate_html
>   File "/build/cython-0.25.1/build/work-dir/run/cpp/annotate_html/annotate_html.cpython-35m-x86_64-linux-gnu.so", line 1, in annotate_html
>
> ----------------------------------------------------------------------
> File "/build/cython-0.25.1/build/work-dir/run/cpp/annotate_html/annotate_html.cpython-35m-x86_64-linux-gnu.so", line 9, in annotate_html
> Failed example:
>     with open(module_path + '.html') as html_file:
>         html = html_file.read()
> Exception raised:
>     Traceback (most recent call last):
>       File "/usr/lib/python3.5/doctest.py", line 1321, in __run
>         compileflags, 1), test.globs)
>       File "", line 2, in 
>         html = html_file.read()
>       File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
>         return codecs.ascii_decode(input, self.errors)[0]
>     UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 16904: ordinal not in range(128)
>
> which then leads also to
>
> ----------------------------------------------------------------------
> File "/build/cython-0.25.1/build/work-dir/run/cpp/annotate_html/annotate_html.cpython-35m-x86_64-linux-gnu.so", line 13, in annotate_html
> Failed example:
>     assert re.search('
', html)
> Exception raised:
>     Traceback (most recent call last):
>       File "/usr/lib/python3.5/doctest.py", line 1321, in __run
>         compileflags, 1), test.globs)
>       File "", line 1, in 
>         assert re.search('
', html)
>     NameError: name 'html' is not defined
>
>
> I guess some locale setting/assumptions?
>
> btw -- what is the "proper" way to run this doctest alone using
> runtests.py?
>
> --
> Yaroslav O. Halchenko
> Center for Open Neuroscience     http://centerforopenneuroscience.org
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
> WWW:   http://www.linkedin.com/in/yarik
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> https://mail.python.org/mailman/listinfo/cython-devel

From matti.picus at gmail.com  Thu Nov 24 00:48:30 2016
From: matti.picus at gmail.com (Matti Picus)
Date: Thu, 24 Nov 2016 07:48:30 +0200
Subject: [Cython] Cython and PyPy
Message-ID: <2fbe319e-7c6b-1ff8-c502-9ed03529047b@gmail.com>

An HTML attachment was scrubbed...
URL: 

From lists at onerussian.com  Wed Nov 30 09:46:19 2016
From: lists at onerussian.com (Yaroslav Halchenko)
Date: Wed, 30 Nov 2016 09:46:19 -0500
Subject: [Cython] 0.25.2b0 with 32bit fixes: (sometimes) Interrupted system
 call in builtin_subtype_methods_T653
Message-ID: <20161130144619.GD23180@onerussian.com>

A fresh one I ran into while rebuilding with fixes for 32bit (thanks
BTW! sorry for not prompt followup/gratitude)

======================================================================
ERROR: runTest (__main__.CythonRunTestCase)
compiling (cpp) and running builtin_subtype_methods_T653
----------------------------------------------------------------------
Traceback (most recent call last):
  File "runtests.py", line 998, in run
    self.run_tests(result, ext_so_path)
  File "runtests.py", line 1013, in run_tests
    self.run_doctests(self.module, result, ext_so_path)
  File "runtests.py", line 1023, in run_doctests
    run_forked_test(result, run_test, self.shortDescription(), self.fork)
  File "runtests.py", line 1076, in run_forked_test
    cid, result_code = os.waitpid(child_id, 0)
OSError: [Errno 4] Interrupted system call

----------------------------------------------------------------------
Ran 581 tests in 188.225s

FAILED (errors=1)

it is not 100% reproducible.  Rebuilding the package went smooth without this
hiccup.  Just wanted to let you know

might be related that the tests were ran as


set -e; for P in 2.7 3.5; do \
 PYTHONPATH=`/bin/ls -d /build/cython-0.25.2~b0/build/lib.*-$P` \
  /usr/bin/python$P runtests.py --shard_count=16 \
        --no-refnanny -v -v --exclude="(parallel|Debugger|annotate_html)" --work-dir=build/work-dir 2>&1; \
done

so testing in parallel to speed up the build  of the package.  This one was the
only failure I have ran into but it built fine before (but there could have
been some changes in the core packages since then)

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        

From robertwb at gmail.com  Wed Nov 30 11:41:23 2016
From: robertwb at gmail.com (Robert Bradshaw)
Date: Wed, 30 Nov 2016 08:41:23 -0800
Subject: [Cython] 0.25.2b0 with 32bit fixes: (sometimes) Interrupted
 system call in builtin_subtype_methods_T653
In-Reply-To: <20161130144619.GD23180@onerussian.com>
References: <20161130144619.GD23180@onerussian.com>
Message-ID: 

When it does reproduce, is it always this particular test?

On Wed, Nov 30, 2016 at 6:46 AM, Yaroslav Halchenko
 wrote:
> A fresh one I ran into while rebuilding with fixes for 32bit (thanks
> BTW! sorry for not prompt followup/gratitude)
>
> ======================================================================
> ERROR: runTest (__main__.CythonRunTestCase)
> compiling (cpp) and running builtin_subtype_methods_T653
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "runtests.py", line 998, in run
>     self.run_tests(result, ext_so_path)
>   File "runtests.py", line 1013, in run_tests
>     self.run_doctests(self.module, result, ext_so_path)
>   File "runtests.py", line 1023, in run_doctests
>     run_forked_test(result, run_test, self.shortDescription(), self.fork)
>   File "runtests.py", line 1076, in run_forked_test
>     cid, result_code = os.waitpid(child_id, 0)
> OSError: [Errno 4] Interrupted system call
>
> ----------------------------------------------------------------------
> Ran 581 tests in 188.225s
>
> FAILED (errors=1)
>
> it is not 100% reproducible.  Rebuilding the package went smooth without this
> hiccup.  Just wanted to let you know
>
> might be related that the tests were ran as
>
>
> set -e; for P in 2.7 3.5; do \
>  PYTHONPATH=`/bin/ls -d /build/cython-0.25.2~b0/build/lib.*-$P` \
>   /usr/bin/python$P runtests.py --shard_count=16 \
>         --no-refnanny -v -v --exclude="(parallel|Debugger|annotate_html)" --work-dir=build/work-dir 2>&1; \
> done
>
> so testing in parallel to speed up the build  of the package.  This one was the
> only failure I have ran into but it built fine before (but there could have
> been some changes in the core packages since then)
>
> --
> Yaroslav O. Halchenko
> Center for Open Neuroscience     http://centerforopenneuroscience.org
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
> WWW:   http://www.linkedin.com/in/yarik
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> https://mail.python.org/mailman/listinfo/cython-devel