Replace discouraged pkg_resources for Python 3.9+

See https://setuptools.readthedocs.io/en/latest/pkg_resources.html
2 jobs for importlib in 8 minutes and 26 seconds (queued for 2 minutes and 20 seconds)
latest
Status Job ID Name Coverage
  Test
passed #22493
code-quality

00:06:15

3.0%
 
  Build
passed #22494
linux

00:02:10