Closed albertandking closed 2 years ago
hi @jindaxiang Thanks for reporting.
I didn't realize that redis has that kind of versioning.
It turns out that it was Python's builtin's parse logic:
python
Python 3.7.5 (default, Sep 2 2021, 16:30:33)
[Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.version import StrictVersion
>>> StrictVersion("5.0.14.1")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/xintao.lai/.pyenv/versions/3.7.5/lib/python3.7/distutils/version.py", line 40, in __init__
self.parse(vstring)
File "/Users/xintao.lai/.pyenv/versions/3.7.5/lib/python3.7/distutils/version.py", line 137, in parse
raise ValueError("invalid version number '%s'" % vstring)
ValueError: invalid version number '5.0.14.1'
However, https://github.com/pypa/packaging handles this very well. I will switch to it.
>>> from packaging.version import Version, parse
>>> a = parse("5.0.14.1")
>>> a
<Version('5.0.14.1')>
Can you try the latest version to see if it is resolved? thanks
Thanks for your kingly contributition! It works now! Iredis is so nice tool!
iredis
in cmd, it will report :