Skip to content

Fix deprecated calls for Python 3.9 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion gitdb/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def offsets(self):
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':
Expand Down
2 changes: 1 addition & 1 deletion gitdb/test/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down