summaryrefslogtreecommitdiff
path: root/git/compat.py
blob: a95c56674e34dfc365f0490b4fdfe72ffb533511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#-*-coding:utf-8-*-
# config.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# 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 (
    PY3,
    xrange,
    MAXSIZE,
    izip,
)

from gitdb.utils.encoding import (
    string_types,
    text_type,
    force_bytes
)

if PY3:
    import io
    FileType = io.IOBase
else:
    FileType = file