Update Bazaar for run_process and better type safety.

Review Request #12573 — Created Aug. 25, 2022 and submitted

Information

RBTools
release-4.x

Reviewers

BazaarClient has been updated to use the new run_process() instead
of execute(), providing better type safety and results, with more
thorough unit testing.

The functions in BazaarClient have also been updated to have type
annotations. This has already caught a few places where we made
assumptions about values that led to bad command invocations.

Some of this code now asserts the values that are being worked, to
ensure they're not None or the wrong type.

There's further work that may need to be done here.
parse_revision_spec() can fill in None values, which will now
trigger some later assertions, but we should probably raise exceptions
here. A TODO has been left in parse_revision_spec() to track this.

Unit tests pass on Python 3.7-3.11.

Summary ID
Update Bazaar for run_process and better type safety.
`BazaarClient` has been updated to use the new `run_process()` instead of `execute()`, providing better type safety and results, with more thorough unit testing. The functions in `BazaarClient` have also been updated to have type annotations. This has already caught a few places where we made assumptions about values that led to bad command invocations. Some of this code now asserts the values that are being worked, to ensure they're not `None` or the wrong type. There's further work that may need to be done here. `parse_revision_spec()` can fill in `None` values, which will now trigger some later assertions, but we should probably raise exceptions here. A TODO has been left in `parse_revision_spec()` to track this.
2a0f40f62f5daa51f53d662eb86b5600e953cc38
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (26d9ac7)