Commit 7dbec2d6 authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

Speed up imports by using importlib instead of pkg_resources

Speed up imports by up to a second by replacing uses of `pkg_resources`
with the new Python standard library module `importlib.resources` (or,
for Python < 3.7, the backport `importlib_resources`). The old
`pkg_resources` module is known to be slow because it does a lot of
work on startup.

See, for example,
[pypa/setuptools#926]( and
parent fa04b179
Pipeline #123357 failed with stages
in 1 minute and 11 seconds