[Scipy-tickets] [SciPy] #729: SciPy not compatible with python -OO

SciPy Trac scipy-tickets@scipy....
Sat Jul 17 06:41:42 CDT 2010


#729: SciPy not compatible with python -OO
---------------------------+------------------------------------------------
 Reporter:  alan.mcintyre  |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  0.8.0   
Component:  Other          |     Version:          
 Keywords:                 |  
---------------------------+------------------------------------------------

Comment(by rgommers):

 Only 4 errors now, and they are all expected. This is with current trunk
 on OS X and python 2.6. Do you still have an issue?

 Other question, what's the point? The only thing the second O does is to
 strip docstrings. This is of course going to break some code that
 manipulates docstrings. I don't think these errors should be fixed.

 {{{
 ======================================================================
 ERROR: Failure: TypeError (unsupported operand type(s) for %: 'NoneType'
 and 'dict')
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-0.11.1-py2.6.egg/nose/loader.py", line 379, in
 loadTestsFromName
     addr.filename, addr.module)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-0.11.1-py2.6.egg/nose/importer.py", line 39, in
 importFromPath
     return self.importFromDir(dir_path, fqname)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-0.11.1-py2.6.egg/nose/importer.py", line 86, in
 importFromDir
     mod = load_module(part_fqname, fh, filename, desc)
   File "/Users/rgommers/Code/scipy/scipy/cluster/__init__.py", line 9, in
 <module>
     import vq, hierarchy
   File "/Users/rgommers/Code/scipy/scipy/cluster/hierarchy.py", line 1551,
 in <module>
     import matplotlib.pylab
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/matplotlib/pylab.py", line 206, in <module>
     from matplotlib import mpl  # pulls in most modules
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/matplotlib/mpl.py", line 3, in <module>
     from matplotlib import axes
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/matplotlib/axes.py", line 14, in <module>
     import matplotlib.collections as mcoll
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/matplotlib/collections.py", line 21, in <module>
     import matplotlib.backend_bases as backend_bases
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/matplotlib/backend_bases.py", line 32, in <module>
     import matplotlib.widgets as widgets
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/matplotlib/widgets.py", line 12, in <module>
     from mlab import dist
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/matplotlib/mlab.py", line 380, in <module>
     psd.__doc__ = psd.__doc__ % kwdocd
 TypeError: unsupported operand type(s) for %: 'NoneType' and 'dict'

 ======================================================================
 ERROR: test_rvs (test_distributions.TestRvDiscrete)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/Users/rgommers/Code/scipy/scipy/stats/tests/test_distributions.py", line
 249, in test_rvs
     r = stats.rv_discrete(name='sample',values=(states,probability))
   File "/Users/rgommers/Code/scipy/scipy/stats/distributions.py", line
 4804, in __init__
     self._construct_default_doc(longname=longname, extradoc=extradoc)
   File "/Users/rgommers/Code/scipy/scipy/stats/distributions.py", line
 4813, in _construct_default_doc
     if extradoc.startswith('\n\n'):
 AttributeError: 'NoneType' object has no attribute 'startswith'

 ======================================================================
 FAIL: test_doccer.test_decorator(None, ' Docstring\n        Another test\n
 with some indent\n        ')
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-0.11.1-py2.6.egg/nose/case.py", line 183, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/numpy/testing/utils.py", line 284, in assert_equal
     raise AssertionError(msg)
 AssertionError:
 Items are not equal:
  ACTUAL: None
  DESIRED: ' Docstring\n        Another test\n           with some indent\n
 '

 ======================================================================
 FAIL: test_doccer.test_decorator(None, ' Docstring\n            Another
 test\n               with some indent\n        ')
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-0.11.1-py2.6.egg/nose/case.py", line 183, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/numpy/testing/utils.py", line 284, in assert_equal
     raise AssertionError(msg)
 AssertionError:
 Items are not equal:
  ACTUAL: None
  DESIRED: ' Docstring\n            Another test\n               with some
 indent\n        '

 ----------------------------------------------------------------------
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/729#comment:2>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list