Update TFS support to use the new run_process().

Review Request #12565 — Created Aug. 24, 2022 and submitted

Information

RBTools
release-4.x

Reviewers

This updates the TFS wrapper classes to switch over from execute() to
run_process(). This gives us greater type safety across TFS, which is
important in keeping this client implementation maintainable.

All call sites now explicitly read either the byte stream or the Unicode
stream, depending on their needs. There's no longer a risk of expecting
one type and ending up with another.

Unit tests have been updated to spy on run_process_exec(), which gives
us a safe, checked way of returning data for tests that guarantees
proper interpreration by TFS.

Unit tests pass on Python 3.7-3.11.

Summary ID
Update TFS support to use the new run_process().
This updates the TFS wrapper classes to switch over from `execute()` to `run_process()`. This gives us greater type safety across TFS, which is important in keeping this client implementation maintainable. All call sites now explicitly read either the byte stream or the Unicode stream, depending on their needs. There's no longer a risk of expecting one type and ending up with another. Unit tests have been updated to spy on `run_process_exec()`, which gives us a safe, checked way of returning data for tests that guarantees proper interpreration by TFS.
62a79008503fc21c41307130f2ec1879d64281f5
Description From Last Updated

'rbtools.utils.process.RunProcessError' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'rbtools.utils.process.RunProcessResult' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

Can take this out.

maubinmaubin

This comment no longer applies.

maubinmaubin

Same here.

maubinmaubin
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
maubin
  1. 
      
  2. rbtools/clients/tfs.py (Diff revision 2)
     
     
     
    Show all issues

    Can take this out.

  3. rbtools/clients/tfs.py (Diff revision 2)
     
     
     
     
     
    Show all issues

    This comment no longer applies.

  4. rbtools/clients/tfs.py (Diff revision 2)
     
     
     
     
     
    Show all issues

    Same here.

  5. 
      
chipx86
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.x (5df9cc1)
Loading...