Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58bce6b

Browse files
committed
Remove and replace compat.izip
1 parent d6d1550 commit 58bce6b

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

gitdb/fun.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from gitdb.const import NULL_BYTE, BYTE_SPACE
1818
from gitdb.utils.encoding import force_text
19-
from gitdb.utils.compat import izip, buffer, xrange, PY3
19+
from gitdb.utils.compat import buffer, xrange, PY3
2020
from gitdb.typ import (
2121
str_blob_type,
2222
str_commit_type,
@@ -314,7 +314,7 @@ def check_integrity(self, target_size=-1):
314314
right.next()
315315
# this is very pythonic - we might have just use index based access here,
316316
# but this could actually be faster
317-
for lft, rgt in izip(left, right):
317+
for lft, rgt in zip(left, right):
318318
assert lft.rbound() == rgt.to
319319
assert lft.to + lft.ts == rgt.to
320320
# END for each pair

gitdb/pack.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363

6464
from gitdb.const import NULL_BYTE
6565
from gitdb.utils.compat import (
66-
izip,
6766
buffer,
6867
xrange,
6968
to_bytes
@@ -696,7 +695,7 @@ def _set_cache_(self, attr):
696695
iter_offsets = iter(offsets_sorted)
697696
iter_offsets_plus_one = iter(offsets_sorted)
698697
next(iter_offsets_plus_one)
699-
consecutive = izip(iter_offsets, iter_offsets_plus_one)
698+
consecutive = zip(iter_offsets, iter_offsets_plus_one)
700699

701700
offset_map = dict(consecutive)
702701

gitdb/utils/compat.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
PY3 = sys.version_info[0] == 3
44

55
try:
6-
from itertools import izip
76
xrange = xrange
87
except ImportError:
98
# py3
10-
izip = zip
119
xrange = range
1210
# end handle python version
1311

0 commit comments

Comments
 (0)