diff options
author | Harmon <Harmon758@gmail.com> | 2020-02-16 07:57:23 -0600 |
---|---|---|
committer | Harmon <Harmon758@gmail.com> | 2020-02-16 07:57:27 -0600 |
commit | 321c3b46b4792cf83bf0c5814d5a1a43cdf6933d (patch) | |
tree | e431dbdd06a553fab2db2f1e1624a5ad328b284b | |
parent | 59c053ee05d6e5f50f8699260aa0e362b567c033 (diff) | |
download | gitdb-321c3b46b4792cf83bf0c5814d5a1a43cdf6933d.tar.gz |
Remove and replace compat.MAXSIZE
-rw-r--r-- | gitdb/db/loose.py | 4 | ||||
-rw-r--r-- | gitdb/utils/compat.py | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/gitdb/db/loose.py b/gitdb/db/loose.py index 53ade9f..7bf92da 100644 --- a/gitdb/db/loose.py +++ b/gitdb/db/loose.py @@ -50,11 +50,11 @@ from gitdb.fun import ( stream_copy ) -from gitdb.utils.compat import MAXSIZE from gitdb.utils.encoding import force_bytes import tempfile import os +import sys __all__ = ('LooseObjectDB', ) @@ -196,7 +196,7 @@ class LooseObjectDB(FileDBBase, ObjectDBR, ObjectDBW): if istream.binsha is not None: # copy as much as possible, the actual uncompressed item size might # be smaller than the compressed version - stream_copy(istream.read, writer.write, MAXSIZE, self.stream_chunk_size) + stream_copy(istream.read, writer.write, sys.maxsize, self.stream_chunk_size) else: # write object with header, we have to make a new one write_object(istream.type, istream.size, istream.read, writer.write, diff --git a/gitdb/utils/compat.py b/gitdb/utils/compat.py index 6909c53..c426474 100644 --- a/gitdb/utils/compat.py +++ b/gitdb/utils/compat.py @@ -1,8 +1,3 @@ import sys PY3 = sys.version_info[0] == 3 - -try: - MAXSIZE = sys.maxint -except AttributeError: - MAXSIZE = sys.maxsize |