Replaced deprecated module pkg_resources
Removed in py3.12
This commit is contained in:
parent
8dde35dd31
commit
c3d3e6857a
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue