Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Popen as context mgr to ensure streams close
Right now, if run with warnings, the find_library_full method produces a warning: >>> find_library_full("c") <stdin>:1: ResourceWarning: unclosed file <_io.BufferedReader name=3> ResourceWarning: Enable tracemalloc to get the object allocation traceback This change uses the Popen object as a context manager which ensures that its stdout and stderr file handles are properly closed.
- Loading branch information