Encode non-string query parameters as strings

Review Request #10685 — Created Sept. 6, 2019 and submitted — Latest diff uploaded

Information

RBTools
release-1.0.x

Reviewers

There are a few cases where we are passing non-string arguments to
methods that make API calls, which was fine in the past. However, we are
now assuming that all arguments are strings and erroring out if they are
not.

Instead, we now make a best-case attempt to serialize values to strings
and produces a better error message when this process fails.

Confirmed the following hold true on Python versions 2.7, 3.5, 3.6, and
3.7:

  • With this patch applied, rbt status prints the list of status, where
    previously it would throw an exception due to attempting to stringify
    non-string values.
  • With this entire patch stack (/r/10695, /r/10696, and /r/10697),
    rbt post is able to create review requests with commit history.

Commits

Files