Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Issue 2678343010: [raw_io] prevent output_text from returning `unicode` object. (Closed)

Created:
3 years, 10 months ago by iannucci
Modified:
3 years, 10 months ago
CC:
chromium-reviews, infra-reviews+recipes-py_chromium.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[raw_io] prevent output_text from returning `unicode` object. Because of python2's awkward handling of unicode, it's better to use `str` and just "know" that it contains utf-8 encoded data. output_text will still ensure that the returned data is valid utf-8 (by round-tripping the original raw bytes with decode/encode), and so is different than raw_io.output (which does no encoding/decoding whatsoever). The only codepages which we've ever supported have been ASCII and UTF-8 anyway, and since ASCII is a strict subset of UTF-8, this is a reasonable approach. R=martiniss@chromium.org, nodir@chromium.org BUG=689886 Review-Url: https://codereview.chromium.org/2678343010 Committed: https://github.com/luci/recipes-py/commit/0aa2b6364faf52b0536c37534efc4574708cecd6

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -16 lines) Patch
M recipe_modules/raw_io/api.py View 7 chunks +11 lines, -16 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
iannucci
3 years, 10 months ago (2017-02-08 22:24:18 UTC) #1
iannucci
On 2017/02/08 22:24:18, iannucci wrote: +phajdan fyi
3 years, 10 months ago (2017-02-08 22:26:18 UTC) #4
nodir
lgtm
3 years, 10 months ago (2017-02-08 22:27:12 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2678343010/1
3 years, 10 months ago (2017-02-08 22:31:29 UTC) #7
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 22:34:22 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://github.com/luci/recipes-py/commit/0aa2b6364faf52b0536c37534efc4574708...

Powered by Google App Engine
This is Rietveld 408576698