Skip to content

Commit 18dc511

Browse files
authored
Merge pull request #7 from redislabsdev/RED-161971
RED-161971 Replace deprecated usage of pkg_resources
2 parents 748f147 + a2d7fef commit 18dc511

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cly/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
__docformat__ = 'restructuredtext en'
4949
__author__ = 'Alec Thomas <alec@swapoff.org>'
5050
try:
51-
__version__ = __import__('pkg_resources').get_distribution('cly').version
51+
import importlib.metadata
52+
__version__ = importlib.metadata.version('cly')
5253
except Exception:
5354
pass
5455

0 commit comments

Comments
 (0)