swansonk14 / typed-argument-parser

Typed argument parser for Python
MIT License
494 stars 40 forks source link

Versions should not be compared as strings #134

Closed ChristosSpyropoulos closed 4 months ago

ChristosSpyropoulos commented 5 months ago

Hi guys. Great work on your project. I just wanted to point out that comparing versions like this: _IS_PYDANTIC_V1 = pydantic.__version__ < "2.0.0" will break some time. for example:

>>> "10.0" > "2.0"
False

I found it in 3 different places. Thank you all for doing a great job.

kddubey commented 4 months ago

My bad. Thank you for finding and reporting this :-)