D887: httppeer: use native strings for headers
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat Oct 14 06:52:16 UTC 2017
durin42 added inline comments.
INLINE COMMENTS
> yuja wrote in httppeer.py:233
> Appears that encodevalueinheaders() takes bytes.
>
> I don't know which would be better to pass unicodes around or convert them
> at one place.
I'm going to go ahead and not mess with this until I hit some test coverage for it. I think we should probably just leave encodevalueinheaders() as bytes-in but make it native-str-out, but we'll see when we get there.
> yuja wrote in httppeer.py:240
> Perhaps this should be handled in urlencode() because it converts the output
> from str to bytes.
Turns out urlencode already copes with bytes input even on Python 3. A small victory.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D887
To: durin42, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list