replace deprecated pkg_resources to importlib.metadata The pkg_resources module is deprecated[1], and obsoleted in the upcoming Python 3.13. This change replaces the use of pkg_resources to obtain the module version from egg info files by importlib.metadata[2], available since Python 3.8. . [1]: https://setuptools.pypa.io/en/latest/pkg_resources.html [2]: https://docs.python.org/3.11/library/importlib.metadata.html#module-importlib.metadata