Re: [PATCH v2 6/8] git-remote-testpy: hash bytes explicitly

2013-01-17 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: Under Python 3 'hasher.update(...)' must take a byte string and not a unicode string. Explicitly encode the argument to this method as UTF-8 so that this code works under Python 3. This moves the required Python version forward to 2.0.

Re: [PATCH v2 6/8] git-remote-testpy: hash bytes explicitly

2013-01-17 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: John Keeping j...@keeping.me.uk writes: Under Python 3 'hasher.update(...)' must take a byte string and not a unicode string. Explicitly encode the argument to this method as UTF-8 so that this code works under Python 3. This moves the required

Re: [PATCH v2 6/8] git-remote-testpy: hash bytes explicitly

2013-01-17 Thread John Keeping
On Thu, Jan 17, 2013 at 09:00:48PM +, John Keeping wrote: On Thu, Jan 17, 2013 at 12:36:33PM -0800, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: Under Python 3 'hasher.update(...)' must take a byte string and not a unicode string. Explicitly encode the argument to this

Re: [PATCH v2 6/8] git-remote-testpy: hash bytes explicitly

2013-01-17 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: You're right - I think we need to add , errors='replace' to the call to encode. Of if it is used just as a opaque token, you can .encode('hex') or something to punt on the whole issue, no? git-remote-testpy.py | 8 1 file changed, 4

Re: [PATCH v2 6/8] git-remote-testpy: hash bytes explicitly

2013-01-17 Thread John Keeping
On Thu, Jan 17, 2013 at 02:24:37PM -0800, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: You're right - I think we need to add , errors='replace' to the call to encode. Of if it is used just as a opaque token, you can .encode('hex') or something to punt on the whole issue,

Re: [PATCH v2 6/8] git-remote-testpy: hash bytes explicitly

2013-01-17 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Thu, Jan 17, 2013 at 02:24:37PM -0800, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: You're right - I think we need to add , errors='replace' to the call to encode. Of if it is used just as a opaque token, you can .encode('hex')