summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2020-02-15 09:42:17 +0800
committerGitHub <noreply@github.com>2020-02-15 09:42:17 +0800
commitf891e244769f0587f11a5f6099d1049ad1b6a623 (patch)
tree646e2a5385a2dddc8cf06656a682ef03a9e314c7
parent43e16318e9ab95f146e230afe0a7cbdc848473fe (diff)
parent7729239951b5561f5bb5c2d5152ff76833b11826 (diff)
downloadgitdb-f891e244769f0587f11a5f6099d1049ad1b6a623.tar.gz
Merge pull request #53 from lubomir/py39-deprecations
Fix deprecated calls for Python 3.9
-rw-r--r--gitdb/pack.py2
-rw-r--r--gitdb/test/lib.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/gitdb/pack.py b/gitdb/pack.py
index 115d943..2ad2324 100644
--- a/gitdb/pack.py
+++ b/gitdb/pack.py
@@ -410,7 +410,7 @@ class PackIndexFile(LazyMixin):
if self._version == 2:
# read stream to array, convert to tuple
a = array.array('I') # 4 byte unsigned int, long are 8 byte on 64 bit it appears
- a.fromstring(buffer(self._cursor.map(), self._pack_offset, self._pack_64_offset - self._pack_offset))
+ a.frombytes(buffer(self._cursor.map(), self._pack_offset, self._pack_64_offset - self._pack_offset))
# networkbyteorder to something array likes more
if sys.byteorder == 'little':
diff --git a/gitdb/test/lib.py b/gitdb/test/lib.py
index ab1842d..42b9ddc 100644
--- a/gitdb/test/lib.py
+++ b/gitdb/test/lib.py
@@ -157,7 +157,7 @@ def make_bytes(size_in_bytes, randomize=False):
random.shuffle(producer)
# END randomize
a = array('i', producer)
- return a.tostring()
+ return a.tobytes()
def make_object(type, data):