[Numpy-discussion] Please keep Numpy master working on Py3

Pauli Virtanen pav@iki...
Tue Feb 1 17:58:06 CST 2011


Hi,

The master branch did not build today on Python 3. Please make sure that 
your code works correctly also on Python 3, before pushing it.

    ***

I mostly fixed the stuff for now, mostly just the usual bytes vs unicode. 

On Python 3, the tests however give two non-obvious failures -- I'm not 
sure if it's just a matter of the raised exception having a different 
type on Py2 vs Py3, or if it reflects something going wrong. Mark, do you 
have ideas?

	Pauli


======================================================================
ERROR: test_new_iterator.test_iter_buffering_delayed_alloc
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.1/dist-packages/nose-1.0.0.dev-py3.1.egg/
nose/case.py", line 188, in runTest
    self.test(*self.arg)
  File "/home/pauli/prj/scipy/numpy2/dist/linux/lib/python3.1/site-
packages/numpy/core/tests/test_new_iterator.py", line 1471, in 
test_iter_buffering_delayed_alloc
    assert_raises(ValueError, lambda i:i[0:2], i)
  File "/home/pauli/prj/scipy/numpy2/dist/linux/lib/python3.1/site-
packages/numpy/testing/utils.py", line 983, in assert_raises
    return nose.tools.assert_raises(*args,**kwargs)
  File "/usr/lib/python3.1/unittest.py", line 589, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/pauli/prj/scipy/numpy2/dist/linux/lib/python3.1/site-
packages/numpy/core/tests/test_new_iterator.py", line 1471, in <lambda>
    assert_raises(ValueError, lambda i:i[0:2], i)
TypeError: sequence index must be integer, not 'slice'

======================================================================
ERROR: test_object_array_self_reference (test_regression.TestRegression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pauli/prj/scipy/numpy2/dist/linux/lib/python3.1/site-
packages/numpy/core/tests/test_regression.py", line 1499, in 
test_object_array_self_reference
    assert_raises(ValueError, oct, a)
  File "/home/pauli/prj/scipy/numpy2/dist/linux/lib/python3.1/site-
packages/numpy/testing/utils.py", line 983, in assert_raises
    return nose.tools.assert_raises(*args,**kwargs)
  File "/usr/lib/python3.1/unittest.py", line 589, in assertRaises
    callableObj(*args, **kwargs)
TypeError: only integer arrays with one element can be converted to an 
index




More information about the NumPy-Discussion mailing list