Closed
Description
Example warning output from https://buildbot.python.org/all/#/builders/558/builds/802 :
/home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py:258: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py' mode='r' encoding='UTF-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py:258: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py' mode='r' encoding='UTF-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py:258: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py' mode='r' encoding='UTF-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py:258: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py' mode='r' encoding='UTF-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py:258: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py' mode='r' encoding='UTF-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py:258: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/dje/cpython-buildarea/pull_request.edelsohn-fedora-z.refleak/build/Lib/test/test_frame.py' mode='r' encoding='UTF-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
I believe this is related to the following delicate test case:
cpython/Lib/test/test_frame.py
Lines 238 to 258 in 95d6330
Presumably, we could either find a reproducer that doesn't leak resources, or suppress the warnings and/or run the test isolated in a separate process.