• 
      

    Fix up some more unicode vs. bytes issues in RBTools.

    Review Request #9641 — Created Feb. 15, 2018 and submitted

    Information

    RBTools
    master
    9ba9ee7...

    Reviewers

    There were a few more places where we had the wrong types in use, this
    time related to the password prompts and the creation of HTTP headers
    (especially related to Basic auth credentials). This change fixes those
    up.

    Was able to log in and post changes to both the devserver and public
    servers using Python 2.7 and 3.6.

    Description From Last Updated

    The testing doesn't make it clear whether these were all confirmed to work on Python 2.7 and 3.x (and which …

    chipx86chipx86

    Are headers not expected to be bytestrings in py2?

    brenniebrennie

    Missing comma at the end of this line.

    chipx86chipx86
    brennie
    1. 
        
    2. rbtools/api/request.py (Diff revision 1)
       
       
      Show all issues

      Are headers not expected to be bytestrings in py2?

      1. Python 2 works either way but they have to be str on python 3.

    3. 
        
    david
    chipx86
    1. 
        
    2. Show all issues

      The testing doesn't make it clear whether these were all confirmed to work on Python 2.7 and 3.x (and which 3.x).

      How much of this has test coverage today?

      1. This is stuff not covered by the test suite, which was discovered with real-world testing. The getpass calls are purely interactive, and the bug was just that they were printing b'Password:' to the console instead of Password:. For the various header pieces, it worked fine posting against a devserver but failed when posting against reviews.reviewboard.org (I really don't understand what was going wrong--the requests looked fine to my eyes, but nginx didn't like the way things were getting encoded).

    3. rbtools/commands/post.py (Diff revision 2)
       
       
      Show all issues

      Missing comma at the end of this line.

    4. 
        
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (e4602f8)