Closed
Description
The change in commit 79c99c0 specifies the errors
argument of decode()
as a keyword argument. Support for keyword arguments in decode()
was added only in Python 2.7. This causes this code to raise:
TypeError: decode() takes no keyword arguments
on Python 2.6.
This occurs for example on line 2297 of this Travis run.
Specifying the errors
argument in the decode()
invocations in git/objects/commit.py
as a positional argument resolves this. For example, line 504 is currently:
parse_actor_and_date(author_line.decode(self.encoding, errors='replace'))
and should be, to resolve this:
parse_actor_and_date(author_line.decode(self.encoding, 'replace'))
This applies to the three places that were changed by commit 79c99c0.
I verified that the proposed change works on Python 2.6, 2.7, 3.4, 3.5.