Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEnsure file resources are released #326
Merged
Conversation
Byron
added a commit
that referenced
this pull request
Jul 27, 2015
…patch-1 Ensure file resources are released
7c96f58
into
gitpython-developers:master
1 check passed
1 check passed
Thank you very much ! I am afraid there are many more issues of that kind buried in the code as I was wrongly assuming (back in the days) that an object destructor is deterministically called (such as in C++). This led to me failing to explicitly close files. |
what about starting with a grep for 'open'? |
One will have to spread these efforts among GitDB and SMMap as well. Both should have mechanisms to release resources, but I doubt this works properly. For now the best way to workaround these resource related issues is to use a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
SymbolicReference leaked file descriptor resources when iterating on refs. unittest module complained:
symbolic.py:153: ResourceWarning: unclosed file <_io.TextIOWrapper name='...../gitrepo/.git/packed-refs' mode='rt' encoding='UTF-8'>
symbolic.py:148: ResourceWarning: unclosed file <_io.TextIOWrapper name='....../gitrepo/.git/packed-refs' mode='rt' encoding='UTF-8'>