[SciPy-Dev] Scipy on Python 3

Bruce Southey bsouthey at gmail.com
Mon Sep 13 16:01:27 EDT 2010


On Mon, Sep 13, 2010 at 2:32 PM, Bruce Southey <bsouthey at gmail.com> wrote:
>  On 09/11/2010 08:10 PM, Pauli Virtanen wrote:
>>
>> Hi,
>>
>> I flushed the Python 3 branch containing work from me and David to SVN
>> trunk. Scipy now builds with Python 3, and all tests pass, except for
>> scipy.weave which still needs to be ported.
>>
>> More testing is welcome. I suspect Scipy's test suite does not cover all
>> of the code, so there might be some work left to do. You'll probably need
>> the latest 1.5.x branch Numpy to build, due to some fixes in Numpy's
>> distutils that are not in 1.5.0.
>>
>>        Pauli
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
> Hi,
> I checked out revision 6803 and the setup.py is missing the line (based on
> numpy's) for the 'def svn_version()' that is needed before line 82:
>
> out = out.decode()
>
> Let you know if or when I get any other non-weave errors.
>
> Bruce
>
> $ python3 setup.py build
> Traceback (most recent call last):
>  File "setup.py", line 82, in <module>
>    FULLVERSION += svn_version()
>  File "setup.py", line 68, in svn_version
>    for line in out.split('\n'):
> TypeError: Type str doesn't support the buffer API
>

After adding that line, I got scipy installed with a weaver error and
the failures reported by Nils and Warren.

There are a lot of 'PendingDeprecationWarning: Please use assertTrue
instead.' messages resulting from the usage of failUnless which is
deprecated since version 2.7.

Really impressive work!

Bruce

======================================================================
ERROR: Failure: ImportError (No module named c_spec)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.1/site-packages/nose/failure.py", line 37, in runTest
    reraise(self.exc_class, self.exc_val, self.tb)
  File "/usr/lib/python3.1/site-packages/nose/_3.py", line 7, in reraise
    raise exc_class(exc_val).with_traceback(tb)
  File "/usr/lib/python3.1/site-packages/nose/loader.py", line 389, in
loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3.1/site-packages/nose/importer.py", line 39,
in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3.1/site-packages/nose/importer.py", line 86,
in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.1/site-packages/scipy/weave/__init__.py",
line 13, in <module>
    from .inline_tools import inline
  File "/usr/lib64/python3.1/site-packages/scipy/weave/inline_tools.py",
line 5, in <module>
    from . import ext_tools
  File "/usr/lib64/python3.1/site-packages/scipy/weave/ext_tools.py",
line 7, in <module>
    from . import converters
  File "/usr/lib64/python3.1/site-packages/scipy/weave/converters.py",
line 5, in <module>
    from . import c_spec
  File "/usr/lib64/python3.1/site-packages/scipy/weave/c_spec.py",
line 380, in <module>
    import os, c_spec # yes, I import myself to find out my __file__ location.
ImportError: No module named c_spec

======================================================================
FAIL: test_ncg (test_optimize.TestOptimize)
line-search Newton conjugate gradient optimization routine
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.1/site-packages/scipy/optimize/tests/test_optimize.py",
line 177, in test_ncg
    assert_(self.gradcalls == 18, self.gradcalls) # 0.8.0
  File "/usr/lib64/python3.1/site-packages/numpy/testing/utils.py",
line 34, in assert_
    raise AssertionError(msg)
AssertionError: 16

======================================================================
FAIL: test_pdist_minkowski_3_2_iris_float32 (test_distance.TestPdist)
Tests pdist(X, 'minkowski') on iris data. (float32)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.1/site-packages/scipy/spatial/tests/test_distance.py",
line 837, in test_pdist_minkowski_3_2_iris_float32
    self.failUnless(within_tol(Y_test1, Y_right, eps))
AssertionError: False is not True

----------------------------------------------------------------------
Ran 4602 tests in 43.328s

FAILED (KNOWNFAIL=12, SKIP=40, errors=1, failures=2)
<nose.result.TextTestResult run=4602 errors=1 failures=2>



More information about the SciPy-Dev mailing list