[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix crash in gnulib-tool.py under Python 2.6 and lower
From: |
Tim Rühsen |
Subject: |
Re: Fix crash in gnulib-tool.py under Python 2.6 and lower |
Date: |
Sun, 14 Oct 2018 14:20:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 13.10.18 23:19, Darshit Shah wrote:
> Well, I don't think there will be a Python 4 for a very long time. The major
> version number changes only for a large backwards incompatibility. It's taken
> them ~10 years and people still not on Python 3.
>
> Anyways, I don't think this will break even with v4. Since the check is only
> for ensuring the minimum version number.
I was referring to
if not PYTHON3 or sys.version_info[1] < 7:
PYTHON3 is true for any python version except 2 (maybe rename it to
PYTHON2 and inverse the logic ?).
But the 'or sys.version_info[1] < 7' would be true for python 4.0, so it
would print "Python version must be atleast 2.7. Exiting.".
>
> * Tim Rühsen <address@hidden> [181013 23:05]:
>> On 13.10.18 21:28, Darshit Shah wrote:
>>> gnulib-tool.py will currently crash immediately on start if the underlying
>>> Python version is 2.6 or lower. The immediate crash that is seen occurs
>>> during
>>> the check for the Python version. The check uses a syntax which was only
>>> introduced in 2.7. I haven't checked, but I believe that the rest of the
>>> script
>>> also uses 2.7+ syntax. Hence, I have also added a check to the script to
>>> exit
>>> out if the version of Python being used is less than 2.7.
>>
>> Thanks so much !
>>
>> But could make this a bit more future-proof. I was just thinking that
>> python version 4.0 would break your checks.
>>
>> Regards, Tim
>>
>
>
>
>
signature.asc
Description: OpenPGP digital signature