Fix errors Perforce post error when running under Python 3

Review Request #11061 — Created June 27, 2020 and submitted




Python 3 string must be encoded to bytes before being fed to p4.

Manually verified on Windows, Linux, and macOS that this resolves the error we were hitting when using Python 3.
Manually verified that this also still works fine for the same scenario when using Python 2.

Summary ID Author
Added encoding for the input for the perforce command
5e3549a2cdc678c1568f504b0132770c0660c3e9 Chris Otey
Refine the previous fix.
37f47cb835072ec6f23393251a765388f655cf6e Keith Kelly
Fix bad argument order.
d74578c286a089bb47a13d94c2aa820408ecf7b9 Keith Kelly
Description From Last Updated

Hi Kelly. I saw your post on the pull request thread. We don't use GitHub for anything more than storing …

  2. Show all issues

    Hi Kelly.

    I saw your post on the pull request thread. We don't use GitHub for anything more than storing the source code repositories, so communication about a review request is best done here.

    I took a look at this last week and it we will be landing it shortly. It does conflict with some work we're doing that also addresses the same problem (fixed by moving the raw Popen() calls to use our common execute() method, adding the ability for raw input at the same time, since execute() knows about encoding differences), but I want to make sure you receive credit for the fix, so we'll be landing this first.

    As for why it appears to have not had any traction, it's just that we're not in release mode yet for the next patch release for RBTools (that will be coming up in about a week). We've also been busy between the 3.0.18 release, upcoming 4.0 beta, and taking care of some requirements from our support contract customers. It'll be in soon, though.

    1. It's Keith, actually -- Kelly is my last name. :)

      This is good news, because it means the private fork-and-build we had to do to unblock ourselves won't be putting us into a permanent state of having to maintain our own fork. That was my biggest concern.


    2. Ack, I'm so sorry. Keith, my mistake.

      I definitely don't want you to have to maintain it indefinitely :) Next week is the goal. We've had it in testing with some customers, and things are looking stable so far, so I think we're good on a release.

      And I will make sure I get your name right on the release notes.

  1. Ship It!
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (95e37f6)