[Scipy-tickets] [SciPy] #1385: Python 3.2 "ResourceWarning: unclosed file" during scipy.test()

SciPy Trac scipy-tickets@scipy....
Mon Feb 14 13:25:39 CST 2011


#1385: Python 3.2 "ResourceWarning: unclosed file" during scipy.test()
----------------------+-----------------------------------------------------
 Reporter:  cjgohlke  |       Owner:  somebody    
     Type:  defect    |      Status:  needs_review
 Priority:  normal    |   Milestone:  0.9.0       
Component:  Other     |     Version:  0.8.0       
 Keywords:            |  
----------------------+-----------------------------------------------------

Comment(by cjgohlke):

 I agree, these changes are not essential. ResourceWarnings can be enabled
 on the command line, e.g. `python -W default`, or in a script, e.g.
 `warnings.simplefilter('default')`. In Python 3.2 the unittest module has
 been updated to use the 'default' filter while running tests, which is, I
 assume, why the warnings are printed during scipy.test(). A better patch
 would use the `with` statement. But that is backwards incompatible with
 Python 2.4.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1385#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