Replaced deprecated module pkg_resources #311

Merged
ribetm merged 1 commit from ribetm/py312 into master 2024-10-21 10:18:19 +02:00
Showing only changes of commit c3d3e6857a - Show all commits

View file

@ -1,6 +1,6 @@
from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import version as _get_version, PackageNotFoundError
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = _get_version(__name__)
except PackageNotFoundError:
pass