From: Michael Haggerty Date: Sun, 27 Jan 2013 08:41:11 GMT Subject: Re: [PATCH v3 6/8] git-remote-testpy: hash bytes explicitly Message-ID: <5104E827.2040906@alum.mit.edu> In-Reply-To: On 01/27/2013 06:30 AM, Sverre Rabbelier wrote: > On Sat, Jan 26, 2013 at 8:44 PM, Michael Haggerty wrote: >> So to handle all of the cases across Python versions as closely as >> possible to the old 2.x code, it might be necessary to make the code >> explicitly depend on the Python version number, like: > > Does this all go away if we restrict ourselves to python 2.6 and just > use the b prefix? repo.path ultimately comes from the command line, which means that it is a bytestring under Python 2.x and a Unicode string under Python 3.x. It does not come from a literal that could be changed to b"value". (Nor is a six.b()-like function helpful, if that is what you meant; that is also intended to wrap literal strings.) Michael -- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/