Skip to content

Commit 913d806

Browse files
author
Sebastian Thiel
committed
Revert "Drop python 2.7 support and help with encodings"
This reverts commit dac619e.
1 parent ce7e150 commit 913d806

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: python
22
python:
3+
- "2.7"
34
- "3.4"
45
- "3.5"
56
- "3.6"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If it is not in your `PATH`, you can help GitPython find it by setting
1919
the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable.
2020

2121
* Git (1.7.x or newer)
22-
* Python 3 to 3.7.
22+
* Python 2.7 to 3.7.
2323

2424
The list of dependencies are listed in `./requirements.txt` and `./test-requirements.txt`.
2525
The installer takes care of installing them for you.

doc/source/intro.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The object database implementation is optimized for handling large quantities of
1313
Requirements
1414
============
1515

16-
* `Python`_ 3.0 or newer
16+
* `Python`_ 2.7 or newer
1717
* `Git`_ 1.7.0 or newer
1818
It should also work with older versions, but it may be that some operations
1919
involving remotes will not work as expected.

git/compat.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
is_win = (os.name == 'nt')
3131
is_posix = (os.name == 'posix')
3232
is_darwin = (os.name == 'darwin')
33-
if hasattr(sys, 'getfilesystemencoding'):
34-
defenc = sys.getfilesystemencoding()
35-
if defenc is None:
36-
defenc = sys.getdefaultencoding()
33+
defenc = sys.getdefaultencoding()
3734

3835
if PY3:
3936
import io

git/repo/base.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

7-
from builtins import str
87
from collections import namedtuple
98
import logging
109
import os

requirements.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
gitdb2 (>=2.0.0)
2-
gitdb>=0.6.4
3-
ddt>=1.1.1

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _stamp_version(filename):
7979
package_data={'git.test': ['fixtures/*']},
8080
package_dir={'git': 'git'},
8181
license="BSD License",
82-
python_requires='>=3.0, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
82+
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
8383
install_requires=requirements,
8484
tests_require=requirements + test_requirements,
8585
zip_safe=False,
@@ -102,6 +102,8 @@ def _stamp_version(filename):
102102
"Operating System :: Microsoft :: Windows",
103103
"Operating System :: MacOS :: MacOS X",
104104
"Programming Language :: Python",
105+
"Programming Language :: Python :: 2",
106+
"Programming Language :: Python :: 2.7",
105107
"Programming Language :: Python :: 3",
106108
"Programming Language :: Python :: 3.4",
107109
"Programming Language :: Python :: 3.5",

0 commit comments

Comments
 (0)