Skip to content

Commit 321c3b4

Browse files
committed
Remove and replace compat.MAXSIZE
1 parent 59c053e commit 321c3b4

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Diff for: gitdb/db/loose.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
stream_copy
5151
)
5252

53-
from gitdb.utils.compat import MAXSIZE
5453
from gitdb.utils.encoding import force_bytes
5554

5655
import tempfile
5756
import os
57+
import sys
5858

5959

6060
__all__ = ('LooseObjectDB', )
@@ -196,7 +196,7 @@ def store(self, istream):
196196
if istream.binsha is not None:
197197
# copy as much as possible, the actual uncompressed item size might
198198
# be smaller than the compressed version
199-
stream_copy(istream.read, writer.write, MAXSIZE, self.stream_chunk_size)
199+
stream_copy(istream.read, writer.write, sys.maxsize, self.stream_chunk_size)
200200
else:
201201
# write object with header, we have to make a new one
202202
write_object(istream.type, istream.size, istream.read, writer.write,

Diff for: gitdb/utils/compat.py

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
import sys
22

33
PY3 = sys.version_info[0] == 3
4-
5-
try:
6-
MAXSIZE = sys.maxint
7-
except AttributeError:
8-
MAXSIZE = sys.maxsize

0 commit comments

Comments
 (0)