summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gitdb/__init__.py2
-rw-r--r--gitdb/util.py12
-rwxr-xr-xsetup.py6
3 files changed, 10 insertions, 10 deletions
diff --git a/gitdb/__init__.py b/gitdb/__init__.py
index 791a2ef..020a579 100644
--- a/gitdb/__init__.py
+++ b/gitdb/__init__.py
@@ -29,7 +29,7 @@ _init_externals()
__author__ = "Sebastian Thiel"
__contact__ = "byronimo@gmail.com"
__homepage__ = "https://github.com/gitpython-developers/gitdb"
-version_info = (0, 6, 1)
+version_info = (0, 6, 2)
__version__ = '.'.join(str(i) for i in version_info)
diff --git a/gitdb/util.py b/gitdb/util.py
index 5b451fa..8f80156 100644
--- a/gitdb/util.py
+++ b/gitdb/util.py
@@ -8,7 +8,7 @@ import mmap
import sys
import errno
-from io import StringIO
+from io import BytesIO
from smmap import (
StaticWindowMapManager,
@@ -78,14 +78,14 @@ from gitdb.const import (
#{ compatibility stuff ...
-class _RandomAccessStringIO(object):
+class _RandomAccessBytesIO(object):
"""Wrapper to provide required functionality in case memory maps cannot or may
not be used. This is only really required in python 2.4"""
__slots__ = '_sio'
def __init__(self, buf=''):
- self._sio = StringIO(buf)
+ self._sio = BytesIO(buf)
def __getattr__(self, attr):
return getattr(self._sio, attr)
@@ -130,7 +130,7 @@ def make_sha(source=''.encode("ascii")):
def allocate_memory(size):
""":return: a file-protocol accessible memory block of the given size"""
if size == 0:
- return _RandomAccessStringIO('')
+ return _RandomAccessBytesIO(b'')
# END handle empty chunks gracefully
try:
@@ -140,7 +140,7 @@ def allocate_memory(size):
# this of course may fail if the amount of memory is not available in
# one chunk - would only be the case in python 2.4, being more likely on
# 32 bit systems.
- return _RandomAccessStringIO("\0" * size)
+ return _RandomAccessBytesIO(b"\0" * size)
# END handle memory allocation
@@ -169,7 +169,7 @@ def file_contents_ro(fd, stream=False, allow_mmap=True):
# read manully
contents = os.read(fd, os.fstat(fd).st_size)
if stream:
- return _RandomAccessStringIO(contents)
+ return _RandomAccessBytesIO(contents)
return contents
diff --git a/setup.py b/setup.py
index 6c67dc6..12c936a 100755
--- a/setup.py
+++ b/setup.py
@@ -77,7 +77,7 @@ if setuptools_build_py_module:
__author__ = "Sebastian Thiel"
__contact__ = "byronimo@gmail.com"
__homepage__ = "https://github.com/gitpython-developers/gitdb"
-version_info = (0, 6, 1)
+version_info = (0, 6, 2)
__version__ = '.'.join(str(i) for i in version_info)
setup(cmdclass={'build_ext': build_ext_nofail},
@@ -92,8 +92,8 @@ setup(cmdclass={'build_ext': build_ext_nofail},
ext_modules=[Extension('gitdb._perf', ['gitdb/_fun.c', 'gitdb/_delta_apply.c'], include_dirs=['gitdb'])],
license = "BSD License",
zip_safe=False,
- requires=('smmap (>=0.8.3)', ),
- install_requires=('smmap >= 0.8.3'),
+ requires=('smmap (>=0.8.5)', ),
+ install_requires=('smmap >= 0.8.5'),
long_description = """GitDB is a pure-Python git object database""",
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[