We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a1a9e0 commit 0712f11Copy full SHA for 0712f11
1 file changed
src/tr/__init__.py
@@ -1,7 +1,7 @@
1
-import pkg_resources
+from importlib.metadata import version, PackageNotFoundError
2
3
try:
4
- _vnum = pkg_resources.get_distribution('pytaskrunner').version
+ _vnum = version('pytaskrunner')
5
version = f'v{_vnum}'
6
-except pkg_resources.DistributionNotFound:
+except PackageNotFoundError:
7
version = 'v0.0.0'
0 commit comments