nedrysoft / regex101

A cross platform (macOS, Linux & Windows) unofficial "offline" version of the regex101.com website. Uses the users own database (any qt supported backend - sqlite, mysql, postgresql etc) to store expressions.
200 stars 36 forks source link

Flawed Python versioning check #13

Open mathscantor opened 1 week ago

mathscantor commented 1 week ago

Hi, I would like to point out an issue regarding the versioning check at start of deploy.py.

I'm currently on python 3.12.4 and the tuple comparison is not comparing integers but strings. You can reproduce the bug with the python console commands below:

Python 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:12:24) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ('3', '9', '4') < ('3', '2', '0')
False
>>> ('3', '10', '4') < ('3', '2', '0')
True
>>> '10' < '2'
True