diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-07-29 07:57:46 +0800 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-07-29 07:57:46 +0800 |
commit | 913d806f02cf50250d230f88b897350581f80f6b (patch) | |
tree | 734deb5048687341e64f68b4162af81c829458bf | |
parent | ce7e1507fa5f6faf049794d4d47b14157d1f2e50 (diff) | |
download | gitpython-913d806f02cf50250d230f88b897350581f80f6b.tar.gz |
Revert "Drop python 2.7 support and help with encodings"
This reverts commit dac619e4917b0ad43d836a534633d68a871aecca.
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | doc/source/intro.rst | 2 | ||||
-rw-r--r-- | git/compat.py | 5 | ||||
-rw-r--r-- | git/repo/base.py | 1 | ||||
-rw-r--r-- | requirements.txt | 2 | ||||
-rwxr-xr-x | setup.py | 4 |
7 files changed, 7 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index 206c133e..56c86d1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: python python: + - "2.7" - "3.4" - "3.5" - "3.6" @@ -19,7 +19,7 @@ If it is not in your `PATH`, you can help GitPython find it by setting the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable. * Git (1.7.x or newer) -* Python 3 to 3.7. +* Python 2.7 to 3.7. The list of dependencies are listed in `./requirements.txt` and `./test-requirements.txt`. The installer takes care of installing them for you. diff --git a/doc/source/intro.rst b/doc/source/intro.rst index e2cd196b..d68e5eb2 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -13,7 +13,7 @@ The object database implementation is optimized for handling large quantities of Requirements ============ -* `Python`_ 3.0 or newer +* `Python`_ 2.7 or newer * `Git`_ 1.7.0 or newer It should also work with older versions, but it may be that some operations involving remotes will not work as expected. diff --git a/git/compat.py b/git/compat.py index 02dc69de..b63768f3 100644 --- a/git/compat.py +++ b/git/compat.py @@ -30,10 +30,7 @@ PY3 = sys.version_info[0] >= 3 is_win = (os.name == 'nt') is_posix = (os.name == 'posix') is_darwin = (os.name == 'darwin') -if hasattr(sys, 'getfilesystemencoding'): - defenc = sys.getfilesystemencoding() -if defenc is None: - defenc = sys.getdefaultencoding() +defenc = sys.getdefaultencoding() if PY3: import io diff --git a/git/repo/base.py b/git/repo/base.py index 911494ad..f3587080 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -4,7 +4,6 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from builtins import str from collections import namedtuple import logging import os diff --git a/requirements.txt b/requirements.txt index c0cca9f4..63d5ddfe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1 @@ gitdb2 (>=2.0.0) -gitdb>=0.6.4 -ddt>=1.1.1 @@ -79,7 +79,7 @@ setup( package_data={'git.test': ['fixtures/*']}, package_dir={'git': 'git'}, license="BSD License", - python_requires='>=3.0, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', install_requires=requirements, tests_require=requirements + test_requirements, zip_safe=False, @@ -102,6 +102,8 @@ setup( "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", |