_I recommend reviewing this with whitespace changes disabled._
Signal has renamed its primary branch to `main`. This updates references
to the old name, `master`, to either reference `main` or a specific
commit hash.
I also fixed a couple of small whitespace issues in a file I was
editing.
This quiets the following deprecation warning:
./Scripts/reverse_integration_check.py:56: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
tag for tag in unmerged_tags if LooseVersion(tag) > LooseVersion(epoch_tag)
[`distutils.LooseVersion` will be removed in Python 3.12][0], and there
doesn't seem to be an equivalent in the standard library. I implemented
a simple `Version` class to replicate this functionality.
(I also looked into other solutions, such as rewriting the script in
Swift, but this seems like the right solution for now.)
[0]: https://peps.python.org/pep-0632/
This adds `5.23.0.22-beta` to our list of ignored tags, to avoid this error when running the script:
RuntimeError: 💥 Found unmerged tags: ['5.23.0.22-beta']
We saw this error when deploying 5.25.
In Python 2, `subprocess.check_output` returns a string. In Python 3, it
returns a byte string unless you provide `text=True`.
This makes sure all calls have that option for compatibility.
Also, my editor was auto-formatting these with [Black][0], which I
didn't prevent, so now these files are formatted a little better.
[0]: https://github.com/psf/black