techtonik / python-patch

Library to parse and apply unified diffs
https://pypi.python.org/pypi/patch
106 stars 63 forks source link

Fixed fromstring for Python3 #38

Closed lasote closed 8 years ago

lasote commented 8 years ago

In python3 if you pass a string to fromstring(s) method it fails because:

TypeError: 'str' does not support the buffer interface

The str has to be encoded to bytes before instance a PatchSet

lasote commented 8 years ago

Ok, I see that your CI system fails because you are already passing bytes to fromstring. If it's the behavior that you want close this PR. But I think that a "fromstring" method maybe could accept strings.