Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dac619e

Browse filesBrowse files
author
Sebastian Thiel
committed
Drop python 2.7 support and help with encodings
Fixes #312
1 parent 1bb0b17 commit dac619e
Copy full SHA for dac619e

File tree

7 files changed

+10
-7
lines changed
Filter options

7 files changed

+10
-7
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- "2.7"
43
- "3.4"
54
- "3.5"
65
- "3.6"

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
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 2.7 to 3.7.
22+
* Python 3 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

Copy file name to clipboardExpand all lines: doc/source/intro.rst
+1-1Lines changed: 1 addition & 1 deletion
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`_ 2.7 or newer
16+
* `Python`_ 3.0 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

Copy file name to clipboardExpand all lines: git/compat.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
is_win = (os.name == 'nt')
3131
is_posix = (os.name == 'posix')
3232
is_darwin = (os.name == 'darwin')
33-
defenc = sys.getdefaultencoding()
33+
if hasattr(sys, 'getfilesystemencoding'):
34+
defenc = sys.getfilesystemencoding()
35+
if defenc is None:
36+
defenc = sys.getdefaultencoding()
3437

3538
if PY3:
3639
import io

‎git/repo/base.py

Copy file name to clipboardExpand all lines: git/repo/base.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
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
78
from collections import namedtuple
89
import logging
910
import os

‎requirements.txt

Copy file name to clipboard
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
gitdb2 (>=2.0.0)
2+
gitdb>=0.6.4
3+
ddt>=1.1.1

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+1-3Lines changed: 1 addition & 3 deletions
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='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
82+
python_requires='>=3.0, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
8383
install_requires=requirements,
8484
tests_require=requirements + test_requirements,
8585
zip_safe=False,
@@ -102,8 +102,6 @@ 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",
107105
"Programming Language :: Python :: 3",
108106
"Programming Language :: Python :: 3.4",
109107
"Programming Language :: Python :: 3.5",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.