File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " redis"
7- version = " 5.2.1 "
7+ dynamic = [ " version " ]
88description = " Python client for Redis database and key-value store"
99readme = " README.md"
1010license = " MIT"
@@ -56,6 +56,9 @@ Documentation = "https://redis.readthedocs.io/en/latest/"
5656Homepage = " https://github.com/redis/redis-py"
5757"Issue tracker" = " https://github.com/redis/redis-py/issues"
5858
59+ [tool .hatch .version ]
60+ path = " redis/__init__.py"
61+
5962[tool .hatch .build .targets .sdist ]
6063include = [
6164 " /redis" ,
Original file line number Diff line number Diff line change 1- from importlib import metadata
2-
31from redis import asyncio # noqa
42from redis .backoff import default_backoff
53from redis .client import Redis , StrictRedis
@@ -44,16 +42,9 @@ def int_or_str(value):
4442 return value
4543
4644
47- try :
48- __version__ = metadata .version ("redis" )
49- except metadata .PackageNotFoundError :
50- __version__ = "99.99.99"
51-
45+ __version__ = "5.2.1"
46+ VERSION = tuple (map (int_or_str , __version__ .split ("." )))
5247
53- try :
54- VERSION = tuple (map (int_or_str , __version__ .split ("." )))
55- except AttributeError :
56- VERSION = tuple ([99 , 99 , 99 ])
5748
5849__all__ = [
5950 "AuthenticationError" ,
You can’t perform that action at this time.
0 commit comments