Update Bazaar for run_process and better type safety.

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

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.

Commits

Files