From ae2ff0f9d704dc776a1934f72a339da206a9fff4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 4 Jan 2015 19:50:28 +0100 Subject: Dum brute force conversion of all types. However, StringIO really is ByteIO in most cases, and py2.7 should run but doesn't. This should be made work first. --- git/compat.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'git/compat.py') diff --git a/git/compat.py b/git/compat.py index 52fc599c..611005a1 100644 --- a/git/compat.py +++ b/git/compat.py @@ -5,15 +5,22 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php """utilities to help provide compatibility with python 3""" +# flake8: noqa -from gitdb.utils.compat import ( # noqa +from gitdb.utils.compat import ( PY3, xrange, MAXSIZE, izip, ) -from gitdb.utils.encoding import ( # noqa +from gitdb.utils.encoding import ( string_types, text_type ) + +if PY3: + import io + FileType = io.IOBase +else: + FileType = file -- cgit v1.2.1