diff options
author | Vincent Driessen <me@nvie.com> | 2016-04-14 15:58:27 +0200 |
---|---|---|
committer | Vincent Driessen <me@nvie.com> | 2016-04-14 16:11:14 +0200 |
commit | 6964e3efc4ac779d458733a05c9d71be2194b2ba (patch) | |
tree | 9b6222e121b0d21878e7754f09a646afab3dc69c /git/compat.py | |
parent | ccb653d655a7bf150049df079622f67fbfd83a28 (diff) | |
download | gitpython-6964e3efc4ac779d458733a05c9d71be2194b2ba.tar.gz |
Drop dependency on six
Diffstat (limited to 'git/compat.py')
-rw-r--r-- | git/compat.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git/compat.py b/git/compat.py index 146bfd4b..b892a9ea 100644 --- a/git/compat.py +++ b/git/compat.py @@ -8,7 +8,6 @@ # flake8: noqa import sys -import six from gitdb.utils.compat import ( PY3, @@ -34,6 +33,7 @@ if PY3: return bytes([n]) def mviter(d): return d.values() + range = xrange unicode = str else: FileType = file @@ -44,6 +44,7 @@ else: byte_ord = ord bchr = chr unicode = unicode + range = xrange def mviter(d): return d.itervalues() @@ -52,9 +53,9 @@ PRE_PY27 = sys.version_info < (2, 7) def safe_decode(s): """Safely decodes a binary string to unicode""" - if isinstance(s, six.text_type): + if isinstance(s, unicode): return s - elif isinstance(s, six.binary_type): + elif isinstance(s, bytes): if PRE_PY27: return s.decode(defenc) # we're screwed else: |