Allow mmap not just for py2.6, 2.7 and 3.6+ but also 3.0+ by hugovk · Pull Request #736 · gitpython-developers/GitPython
from git.compat import (
# Here it comes: on windows in python 2.5, memory maps aren't closed properly # Hence we are in trouble if we try to delete a file that is memory mapped, # which happens during read-tree. # In this case, we will just read the memory in directly. # Its insanely bad ... I am disappointed ! allow_mmap = (is_win or sys.version_info[1] > 5) stream = file_contents_ro(fd, stream=True, allow_mmap=allow_mmap) stream = file_contents_ro(fd, stream=True, allow_mmap=True)
try: self._deserialize(stream)