FTBFS due to test failures

Bug #901840 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cython (Debian)
Fix Released
Unknown
cython (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

cython fails to build in precise. full build log available here:

https://launchpad.net/ubuntu/+source/cython/0.15.1-1/+build/2961231/+files/buildlog_ubuntu-precise-armhf.cython_0.15.1-1_FAILEDTOBUILD.txt.gz

The failure is specifically in the test suite:

======================================================================
FAIL: test (line 1) (dict_getitem.__test__)
Doctest: dict_getitem.__test__.test (line 1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for dict_getitem.__test__.test (line 1)
  File "/build/buildd/cython-0.15.1/build/work-dir/run/c/dict_getitem.so", line unknown line number, in test (line 1)

----------------------------------------------------------------------
File "/build/buildd/cython-0.15.1/build/work-dir/run/c/dict_getitem.so", line ?, in dict_getitem.__test__.test (line 1)
Failed example:
    test(None, 1) # doctest: +ELLIPSIS
Expected:
    Traceback (most recent call last):
    TypeError: ...subscriptable...
Got:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest dict_getitem.__test__.test (line 1)[6]>", line 1, in <module>
        test(None, 1) # doctest: +ELLIPSIS
      File "dict_getitem.pyx", line 26, in dict_getitem.test (dict_getitem.c:561)
    TypeError: 'NoneType' object has no attribute '__getitem__'

======================================================================
FAIL: test (line 1) (dict_getitem.__test__)
Doctest: dict_getitem.__test__.test (line 1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for dict_getitem.__test__.test (line 1)
  File "/build/buildd/cython-0.15.1/build/work-dir/run/cpp/dict_getitem.so", line unknown line number, in test (line 1)

----------------------------------------------------------------------
File "/build/buildd/cython-0.15.1/build/work-dir/run/cpp/dict_getitem.so", line ?, in dict_getitem.__test__.test (line 1)
Failed example:
    test(None, 1) # doctest: +ELLIPSIS
Expected:
    Traceback (most recent call last):
    TypeError: ...subscriptable...
Got:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest dict_getitem.__test__.test (line 1)[6]>", line 1, in <module>
        test(None, 1) # doctest: +ELLIPSIS
      File "dict_getitem.pyx", line 26, in dict_getitem.test (dict_getitem.cpp:561)
    TypeError: 'NoneType' object has no attribute '__getitem__'

======================================================================
FAIL: index ()
Doctest: index
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for index
  File "/build/buildd/cython-0.15.1/build/work-dir/run/c/index.so", line 37, in index

----------------------------------------------------------------------
File "/build/buildd/cython-0.15.1/build/work-dir/run/c/index.so", line 39, in index
Failed example:
    index_object(100, 100)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: 'int' object is not subscriptable
Got:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest index[0]>", line 1, in <module>
        index_object(100, 100)
      File "index.pyx", line 65, in index.index_object (index.c:915)
    TypeError: 'int' object has no attribute '__getitem__'

======================================================================
FAIL: index ()
Doctest: index
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for index
  File "/build/buildd/cython-0.15.1/build/work-dir/run/cpp/index.so", line 43, in index

----------------------------------------------------------------------
File "/build/buildd/cython-0.15.1/build/work-dir/run/cpp/index.so", line 45, in index
Failed example:
    index_object(100, 100)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: 'int' object is not subscriptable
Got:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest index[0]>", line 1, in <module>
        index_object(100, 100)
      File "index.pyx", line 65, in index.index_object (index.cpp:915)
    TypeError: 'int' object has no attribute '__getitem__'

I have verified this in a from-upstream-source-tarball build under a Python 2.7 virtualenv, using gcc 4.6.2 on Precise. However, the source tarball builds and tests perfectly fine in a 2.6 or 2.7 virtualenv on Ubuntu 11.10 using gcc-4.6.1. I also tested with gcc-4.5.3 on precise with Python 2.7 and I get the exact same error. I'm currently at a loss for what the problem could be but will contact upstream to see if they have any ideas.

Note too that it makes no difference if I comment out the Scriptable cdef class in dict_getitem.pyx. I can't actually tell what this class is supposed to do, but it makes no difference to the test failure. Next up, I'll try the same thing on precise with a from-source build of Python 2.7 and 2.7.

Related branches

Revision history for this message
Barry Warsaw (barry) wrote :

Same failure occurs in a Python 2.7 built from the Mercurial source on Precise.

Revision history for this message
Barry Warsaw (barry) wrote :

Oh yeah, all testing done on amd64, but I don't think that matters.

Revision history for this message
Barry Warsaw (barry) wrote :

Upstream contacted - awaiting response.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cython - 0.15.1-1ubuntu1

---------------
cython (0.15.1-1ubuntu1) precise; urgency=low

  * debian/patches/python27-testsuite-fix.patch:
    Fix test suite for Python 2.7 change. Patch comes from Cython
    upstream, post 0.15.1 release. (LP: #901840)
 -- Barry Warsaw <email address hidden> Thu, 08 Dec 2011 20:23:25 -0500

Changed in cython (Ubuntu):
status: New → Fix Released
Changed in cython (Debian):
status: Unknown → New
Revision history for this message
Barry Warsaw (barry) wrote :

I've ported and submitted the Ubuntu fix to the Debian issue.

Changed in cython (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.