Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ff57c04
Remove str import from builtins
Harmon758 Feb 7, 2020
e0bf255
Remove unnecessary check for sys.getfilesystemencoding
Harmon758 Feb 7, 2020
142c779
Remove and replace compat.FileType
Harmon758 Feb 7, 2020
584ab08
Remove compat.byte_ord
Harmon758 Feb 7, 2020
e564c2f
Remove and replace compat.bchr
Harmon758 Feb 7, 2020
5444787
Remove and replace compat.mviter
Harmon758 Feb 7, 2020
3f21cb1
Remove compat.range
Harmon758 Feb 7, 2020
d0d2a86
Remove and replace compat.xrange
Harmon758 Feb 7, 2020
91e91b2
Remove and replace compat.unicode
Harmon758 Feb 7, 2020
c30880d
Remove Python 2 check for compat.defenc
Harmon758 Feb 7, 2020
2c4d556
Remove and replace compat.binary_type
Harmon758 Feb 7, 2020
8e55323
Remove and replace compat._unichr
Harmon758 Feb 7, 2020
18fc6b2
Remove and replace compat.bytes_chr
Harmon758 Feb 7, 2020
9615ada
Remove surrogateescape error handler for Python 2
Harmon758 Feb 7, 2020
5549ffe
Remove and replace compat.UnicodeMixin
Harmon758 Feb 7, 2020
60c8dc2
Remove checks for Python 2 and/or 3
Harmon758 Feb 7, 2020
6005b89
Remove Python 2 test
Harmon758 Feb 7, 2020
952eaad
Remove compat.PY3
Harmon758 Feb 7, 2020
266187b
Remove and replace compat.MAXSIZE
Harmon758 Feb 7, 2020
8a8b24e
Remove and replace compat.izip
Harmon758 Feb 7, 2020
07df7c9
Remove and replace compat.string_types
Harmon758 Feb 7, 2020
2f31261
Remove and replace compat.text_type
Harmon758 Feb 7, 2020
369de3d
Remove no longer used compat imports
Harmon758 Feb 7, 2020
92348df
Remove no longer used imports in tests
Harmon758 Feb 7, 2020
ebcdb8b
Remove attempt to import ConfigParser for Python 2
Harmon758 Feb 7, 2020
7f250ca
Remove check for Python 2.7
Harmon758 Feb 7, 2020
21d56e2
Remove unnecessary check for logging.NullHandler for Python 2.6
Harmon758 Feb 7, 2020
d96688f
Improve setup.py python_requires
Harmon758 Feb 7, 2020
d0cd5bf
Remove unnecessary check for PermissionError for Python < 3.3
Harmon758 Feb 7, 2020
a611adc
Add to AUTHORS
Harmon758 Feb 7, 2020
d0899a0
Fix requirements.txt formatting
Harmon758 Feb 7, 2020
c5f5911
Remove now unused is_invoking_git variable in test
Harmon758 Feb 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove and replace compat.xrange
  • Loading branch information
Harmon758 committed Feb 7, 2020
commit d0d2a869bce44a420c813891a84f2174895cd0d9
1 change: 0 additions & 1 deletion git/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


from gitdb.utils.compat import (
xrange,
MAXSIZE, # @UnusedImport
izip, # @UnusedImport
)
Expand Down
3 changes: 1 addition & 2 deletions git/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from git.compat import (
izip,
xrange,
string_types,
force_bytes,
defenc,
Expand Down Expand Up @@ -912,7 +911,7 @@ def move(self, items, skip_errors=False, **kwargs):

# parse result - first 0:n/2 lines are 'checking ', the remaining ones
# are the 'renaming' ones which we parse
for ln in xrange(int(len(mvlines) / 2), len(mvlines)):
for ln in range(int(len(mvlines) / 2), len(mvlines)):
tokens = mvlines[ln].split(' to ')
assert len(tokens) == 2, "Too many tokens in %s" % mvlines[ln]

Expand Down
3 changes: 1 addition & 2 deletions git/objects/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from git.compat import (
safe_decode,
defenc,
xrange,
text_type
)

Expand All @@ -20,7 +19,7 @@ def tree_to_stream(entries, write):

for binsha, mode, name in entries:
mode_str = b''
for i in xrange(6):
for i in range(6):
mode_str = bytes([((mode >> (i * 3)) & bit_mask) + ord_zero]) + mode_str
# END for each 8 octal value

Expand Down
3 changes: 1 addition & 2 deletions git/refs/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from git.compat import (
PY3,
xrange,
string_types,
defenc
)
Expand Down Expand Up @@ -220,7 +219,7 @@ def entry_at(cls, filepath, index):
if index < 0:
return RefLogEntry.from_line(fp.readlines()[index].strip())
# read until index is reached
for i in xrange(index + 1):
for i in range(index + 1):
line = fp.readline()
if not line:
break
Expand Down
3 changes: 1 addition & 2 deletions git/repo/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import stat
from string import digits

from git.compat import xrange
from git.exc import WorkTreeRepositoryUnsupported
from git.objects import Object
from git.refs import SymbolicReference
Expand Down Expand Up @@ -307,7 +306,7 @@ def rev_parse(repo, rev):
try:
if token == "~":
obj = to_commit(obj)
for _ in xrange(num):
for _ in range(num):
obj = obj.parents[0]
# END for each history item to walk
elif token == "^":
Expand Down
3 changes: 1 addition & 2 deletions git/test/performance/test_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from .lib import TestBigRepoRW
from git import Commit
from gitdb import IStream
from git.compat import xrange
from git.test.test_commit import assert_commit_serialization


Expand Down Expand Up @@ -90,7 +89,7 @@ def test_commit_serialization(self):

nc = 5000
st = time()
for i in xrange(nc):
for i in range(nc):
cm = Commit(rwrepo, Commit.NULL_BIN_SHA, hc.tree,
hc.author, hc.authored_date, hc.author_tz_offset,
hc.committer, hc.committed_date, hc.committer_tz_offset,
Expand Down