The --version option uses pkg_resources to get the version information from the distribution metadata. Use importlib_metadata instead, but don't make it a dependency. When creating the decorator, issue a warning if a version is not given and importlib_metadata is not installed.
The
--versionoption uses pkg_resources to get the version information from the distribution metadata. Use importlib_metadata instead, but don't make it a dependency. When creating the decorator, issue a warning if aversionis not given and importlib_metadata is not installed.