Skip to content

Commit

Permalink
Drop python 2.7 support and help with encodings
Browse files Browse the repository at this point in the history
Fixes #312
  • Loading branch information
Sebastian Thiel committed Jul 20, 2019
1 parent 1bb0b17 commit dac619e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 2.7 to 3.7.
* Python 3 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.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The object database implementation is optimized for handling large quantities of
Requirements
============

* `Python`_ 2.7 or newer
* `Python`_ 3.0 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.
Expand Down
5 changes: 4 additions & 1 deletion git/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
is_win = (os.name == 'nt')
is_posix = (os.name == 'posix')
is_darwin = (os.name == 'darwin')
defenc = sys.getdefaultencoding()
if hasattr(sys, 'getfilesystemencoding'):
defenc = sys.getfilesystemencoding()
if defenc is None:
defenc = sys.getdefaultencoding()

if PY3:
import io
Expand Down
1 change: 1 addition & 0 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# 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
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
gitdb2 (>=2.0.0)
gitdb>=0.6.4
ddt>=1.1.1
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _stamp_version(filename):
package_data={'git.test': ['fixtures/*']},
package_dir={'git': 'git'},
license="BSD License",
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
python_requires='>=3.0, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
install_requires=requirements,
tests_require=requirements + test_requirements,
zip_safe=False,
Expand All @@ -102,8 +102,6 @@ def _stamp_version(filename):
"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",
Expand Down

0 comments on commit dac619e

Please sign in to comment.