Skip to content

Commit 6200a60

Browse files
committed
RED-161971 Replace deprecated usage of pkg_resources
1 parent b906f37 commit 6200a60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cly/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
__docformat__ = 'restructuredtext en'
3535
__author__ = 'Alec Thomas <[email protected]>'
3636
try:
37-
__version__ = __import__('pkg_resources').get_distribution('cly').version
38-
except ImportError:
37+
import importlib.metadata
38+
__version__ = importlib.metadata.version('cly')
39+
except Exception:
3940
pass
4041

4142

0 commit comments

Comments
 (0)