Skip to content

ResourceWarning (python 3) #263

@ryneeverett

Description

@ryneeverett

Every time I add a file to the index I get the following warning:

home/ryne/projects/GitPython/git/index/base.py:609: ResourceWarning: unclosed file <_io.BufferedReader name='my_file.txt'>

This warning was added in python 3.2 and is triggered by allowing the reference count of an opened file to go to zero -- in this case stream in IndexFile._store_path.

Is it safe to call stream.close() after the istream object is created?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions