Switch from pkg_resources to importlib/packaging.

Review Request #13067 — Created May 25, 2023 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

pkg_resources is deprecated, and not long for this world. To modernize
our code, we now use importlib (specifically, the importlib_metadata
and importlib_resources compatibility modules) and packaging.

These aren't one-to-one replacements for pkg_resources, but porting
was pretty minimal. For the purposes of RBTools, the new APIs give us
everything we need to look up entrypoints, fetch resource files, and
compare versions.

Tested running built-in RBTools commands, aliases, entrypoint-based
third-party commands, and commands in the search path starting with
rbt-.

Tested generating command line completion scripts.

Tested version parsing for all our flavors of version identifiers
provided throughout Review Board history (old-school 1.0alpha1
through modern 6.0b2).

Commits

Files