BIND 10 #845: Python 3.2 warnings

BIND 10 Development do-not-reply at isc.org
Mon Apr 11 10:42:56 UTC 2011


#845: Python 3.2 warnings
-------------------------------------+-------------------------------------
           Reporter:  shane          |                      Owner:
               Type:  task           |                     Status:  new
           Priority:  minor          |                  Milestone:  Year 3
          Component:  Unclassified   |  Task Backlog
          Sensitive:  0              |                   Keywords:
Add Hours to Ticket:  0              |  Estimated Number of Hours:  0
        Total Hours:  0              |                  Billable?:  1
                                     |                  Internal?:  0
-------------------------------------+-------------------------------------
 Python 3.2 warns of certain resources leaks when running our tests. For
 example with the src/bin/bind10/tests we see:

 {{{
 /home/shane/isc/bind10/git/bind10/src/bin/bind10/tests/bind10_test.py:586:
 ResourceWarning: unclosed file <_io.TextIOWrapper name='./bind10.pid'
 mode='r' encoding='UTF-8'>
       self.assertEqual(my_pid, int(open(self.pid_file, "r").read()))
 /home/shane/isc/bind10/git/bind10/src/bin/bind10/tests/bind10_test.py:592:
 ResourceWarning: unclosed file <_io.TextIOWrapper name='./bind10.pid'
 mode='w' encoding='UTF-8'>
       open(self.pid_file, "w").write('dummy data\n')
 ../home/shane/isc/bind10/git/bind10/src/bin/bind10/tests/bind10_test.py:610:
 ResourceWarning: unclosed file <_io.TextIOWrapper name='./bind10.pid'
 mode='w' encoding='UTF-8'>
       open(self.pid_file, "w").write(dummy_data)
 /home/shane/isc/bind10/git/bind10/src/bin/bind10/tests/bind10_test.py:612:
 ResourceWarning: unclosed file <_io.TextIOWrapper name='./bind10.pid'
 mode='r' encoding='UTF-8'>
       self.assertEqual(dummy_data, open(self.pid_file, "r").read())
 ./home/shane/isc/bind10/git/bind10/src/bin/bind10/tests/bind10_test.py:597:
 ResourceWarning: unclosed file <_io.TextIOWrapper name='./bind10.pid'
 mode='w' encoding='UTF-8'>
       open(self.pid_file, "w").write(dummy_data)
 /home/shane/isc/bind10/git/bind10/src/bin/bind10/tests/bind10_test.py:601:
 ResourceWarning: unclosed file <_io.TextIOWrapper name='./bind10.pid'
 mode='r' encoding='UTF-8'>
       self.assertEqual(dummy_data, open(self.pid_file, "r").read())
     ....../usr/lib/python3.2/unittest/case.py:387: ResourceWarning:
 unclosed file <_io.BufferedWriter name=7>
       function()
     ./home/shane/isc/bind10/git/bind10/src/bin/bind10/bind10.py:186:
 ResourceWarning: unclosed file <_io.BufferedWriter name=8>
       preexec_fn=self._preexec_work)
     /usr/lib/python3.2/unittest/case.py:387: ResourceWarning: unclosed
 file <_io.BufferedWriter name=9>
 }}}

 These are probably harmless, but we should endeavor to make sure we run
 without warnings.

-- 
Ticket URL: <http://bind10.isc.org/ticket/845>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list