[issue11342] ResourceWarning: unclosed file <_io.TextIOWrapper

LW report at bugs.python.org
Fri Mar 4 02:17:32 CET 2011


LW <cjejuni2000 at yahoo.com> added the comment:

so i downloaded the python-3.2 source again, applied the .diff file. still getting _io.TextIOWrapper open file error. then ran the major 5 individual make test_ files errors. hope u can find from these:

===================================================================
les at Liquid:~/Desktop/Python-3.2$ ./python -m test -v test_distutils

== CPython 3.2 (r32:88445, Mar 3 2011, 16:17:04) [GCC 4.4.5]
==   Linux-2.6.35-27-generic-pae-i686-with-debian-squeeze-sid little-endian
==   /home/les/Desktop/Python-3.2/build/test_python_32202
Testing with flags: sys.flags(debug=0, division_warning=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0)

test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... unknown, 0: Warning: using regular magic file `/etc/magic'
ok
test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... unknown, 0: Warning: using regular magic file `/etc/magic'
ok
==================================================================

==================================================================
./python -m test -v test_parser
test_trigger_memory_error (test.test_parser.ParserStackLimitTestCase) ... Expecting 's_push: parser stack overflow' in next line
s_push: parser stack overflow
ok

=================================================================
./python -m test -v test_startfile
test_startfile skipped -- module os has no attribute startfile
=================================================================

=================================================================
./python -m test -v test_subprocess

test_executable_without_cwd (test.test_subprocess.ProcessTestCase) ... skipped 'need an installed Python. See #7774'
test_stdout_none (test.test_subprocess.ProcessTestCase) ...     this bit of output is from a test of stdout in a different process ...
ok
test_pass_fds (test.test_subprocess.POSIXProcessTestCase) ...  -- maxfd = 1024
 -- fds that should have been closed: {4, 5, 6, 7, 8, 9, 10, 11, 12}
 -- fds that remained open: {0, 1, 2, 3}
 -- fds that should have been closed: {3, 5, 6, 7, 8, 9, 10, 11, 12}
 -- fds that remained open: {0, 1, 2, 4}
 -- fds that should have been closed: {3, 4, 6, 7, 8, 9, 10, 11, 12}
 -- fds that remained open: {0, 1, 2, 5}
 -- fds that should have been closed: {3, 4, 5, 7, 8, 9, 10, 11, 12}
 -- fds that remained open: {0, 1, 2, 6}
 -- fds that should have been closed: {3, 4, 5, 6, 8, 9, 10, 11, 12}
 -- fds that remained open: {0, 1, 2, 7}
 -- fds that should have been closed: {3, 4, 5, 6, 7, 9, 10, 11, 12}
 -- fds that remained open: {0, 1, 2, 8}
 -- fds that should have been closed: {3, 4, 5, 6, 7, 8, 10, 11, 12}
 -- fds that remained open: {0, 1, 2, 9}
 -- fds that should have been closed: {3, 4, 5, 6, 7, 8, 9, 11, 12}
 -- fds that remained open: {0, 1, 2, 10}
 -- fds that should have been closed: {3, 4, 5, 6, 7, 8, 9, 10, 12}
 -- fds that remained open: {0, 1, 2, 11}
 -- fds that should have been closed: {3, 4, 5, 6, 7, 8, 9, 10, 11}
 -- fds that remained open: {0, 1, 2, 12}
ok
test_executable_without_cwd (test.test_subprocess.ProcessTestCasePOSIXPurePython) ... skipped 'need an installed Python. See #7774'
==================================================================

==================================================================
./python -m test -v test_urllib2_localnet

test_sending_headers (test.test_urllib2_localnet.TestUrlopen) ... ok

======================================================================
FAIL: test_proxy_with_bad_password_raises_httperror (test.test_urllib2_localnet.ProxyAuthTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/les/Desktop/Python-3.2/Lib/test/test_urllib2_localnet.py", line 267, in test_proxy_with_bad_password_raises_httperror
    self.URL)
AssertionError: HTTPError not raised by open

======================================================================
FAIL: test_proxy_with_no_password_raises_httperror (test.test_urllib2_localnet.ProxyAuthTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/les/Desktop/Python-3.2/Lib/test/test_urllib2_localnet.py", line 273, in test_proxy_with_no_password_raises_httperror
    self.URL)
AssertionError: HTTPError not raised by open

----------------------------------------------------------------------
Ran 18 tests in 1.888s

FAILED (failures=2)
test test_urllib2_localnet failed -- multiple errors occurred
1 test failed:
    test_urllib2_localnet





thanks again

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11342>
_______________________________________


More information about the Python-bugs-list mailing list