Skip to content

Commit 936a03d

Browse files
committed
* github.com:gitpython-developers/GitPython: Remove redundant Python 2.4 code Specify Python 3.6 support Fix flake8
2 parents c467cc0 + ceacc6f commit 936a03d

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

Diff for: README.md

+2-2
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.5, while python 2.6 is supported on a *best-effort basis*.
22+
* Python 2.7 to 3.6, while python 2.6 is supported on a *best-effort basis*.
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.
@@ -125,7 +125,7 @@ Please have a look at the [contributions file][contributing].
125125

126126
### How to verify a release
127127

128-
Please only use releases from `pypi` as you can verify the respective source
128+
Please only use releases from `pypi` as you can verify the respective source
129129
tarballs.
130130

131131
This script shows how to verify the tarball was indeed created by the authors of

Diff for: git/repo/base.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import logging
99
import os
1010
import re
11-
import sys
1211
import warnings
1312

1413
from git.cmd import (
@@ -40,11 +39,6 @@
4039

4140
log = logging.getLogger(__name__)
4241

43-
DefaultDBType = GitCmdObjectDB
44-
if sys.version_info[:2] < (2, 5): # python 2.4 compatibility
45-
DefaultDBType = GitCmdObjectDB
46-
# END handle python 2.4
47-
4842
BlameEntry = namedtuple('BlameEntry', ['commit', 'linenos', 'orig_path', 'orig_linenos'])
4943

5044

@@ -88,7 +82,7 @@ class Repo(object):
8882
# Subclasses may easily bring in their own custom types by placing a constructor or type here
8983
GitCommandWrapperType = Git
9084

91-
def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=False, expand_vars=True):
85+
def __init__(self, path=None, odbt=GitCmdObjectDB, search_parent_directories=False, expand_vars=True):
9286
"""Create a new Repo instance
9387
9488
:param path:
@@ -869,7 +863,7 @@ def blame(self, rev, file, incremental=False, **kwargs):
869863
return blames
870864

871865
@classmethod
872-
def init(cls, path=None, mkdir=True, odbt=DefaultDBType, expand_vars=True, **kwargs):
866+
def init(cls, path=None, mkdir=True, odbt=GitCmdObjectDB, expand_vars=True, **kwargs):
873867
"""Initialize a git repository at the given path if specified
874868
875869
:param path:

Diff for: setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def _stamp_version(filename):
101101
package_data={'git.test': ['fixtures/*']},
102102
package_dir={'git': 'git'},
103103
license="BSD License",
104+
python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*',
104105
requires=['gitdb2 (>=2.0.0)'],
105106
install_requires=install_requires,
106107
test_requirements=test_requires + install_requires,

0 commit comments

Comments
 (0)