[Scipy-tickets] [SciPy] #543: Scipy appears to be incorrectly managing the ref count of None

SciPy scipy-tickets@scipy....
Wed Nov 21 14:31:32 CST 2007


#543: Scipy appears to be incorrectly managing the ref count of None
----------------------+-----------------------------------------------------
 Reporter:  steffeat  |       Owner:  somebody              
     Type:  defect    |      Status:  new                   
 Priority:  normal    |   Milestone:  0.7                   
Component:  Other     |     Version:  devel                 
 Severity:  normal    |    Keywords:  None Py_None ref count
----------------------+-----------------------------------------------------
 Scipy does not appear to be keeping accurate track of the reference count
 of the null variable None.

 /Users/asteffen% python
 Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
 [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import sys
 >>> print sys.getrefcount(None)
 420
 >>> import scipy
 >>> print scipy.__version__
 0.7.0.dev3415
 >>> print sys.getrefcount(None)
 3621
 >>> reload(scipy)
 <module 'scipy' from
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
 packages/scipy/__init__.pyc'>
 >>> print sys.getrefcount(None)
 3622
 >>> reload(scipy)
 <module 'scipy' from
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
 packages/scipy/__init__.pyc'>
 >>> print sys.getrefcount(None)
 3623
 >>> reload(scipy)
 <module 'scipy' from
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
 packages/scipy/__init__.pyc'>
 >>> print sys.getrefcount(None)
 3624

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


More information about the Scipy-tickets mailing list