Skip to content

Commit 4da227b

Browse files
committed
refactor: obtain version information dynamically from the installed package metadata
1 parent 60f629f commit 4da227b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

redisvl/version.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
__version__ = "0.9.1"
1+
try:
2+
from importlib.metadata import PackageNotFoundError, version
3+
except ImportError:
4+
# Python < 3.8 fallback
5+
from importlib_metadata import PackageNotFoundError, version # type: ignore
6+
7+
try:
8+
__version__ = version("redisvl")
9+
except PackageNotFoundError:
10+
# Package is not installed (e.g., during development)
11+
__version__ = "0.0.0.dev"

0 commit comments

Comments
 (0)