Re: Swig 4.1.1 no longer checks the python version

William S Fulton <[email protected]> Thu, 1 Jun 2023 11:24:31 +0100
Newsgroups gmane.comp.programming.swig
Message-ID <CANGqftAhN-XsCUYdre+Vv9qVYPwdTksYKy+KeXy8d72_7fMk_Q@mail.gmail.com>
That version check was for syntax checking, but we removed all the Python 3
only syntax so now the .py file can work with both Python 2.7 and 3.3 and
later. Take a look at %begin to put in a similar version check.

William

On Wed, 24 May 2023 at 12:30, Julien Marrec <[email protected]> wrote:

> https://www.swig.org/
>
> *SWIG-4.1.0 summary:*
>
>    - Python 3.3 is now the oldest Python 3 version SWIG supports.
>
> Probably why?
> --
> Julien Marrec, EBCP, BPI MFBA
> Owner at EffiBEM <http://www.effibem.com>
> T: +33 6 95 14 42 13
>
> LinkedIn (en <https://www.linkedin.com/in/julienmarrec>) *| *(fr
> <https://fr.linkedin.com/in/julienmarrec/fr>) :
> <http://www.linkedin.com/in/julienmarrec>
>
>
> Le mer. 24 mai 2023 à 11:49, Lluís Alemany Puig <
> [email protected]> a écrit :
>
>> Hello
>>
>> I just noticed that swig 4.0.2 includes a check of python's version at
>> the beginning of every script, like so:
>>
>> # This file was automatically generated by SWIG (http://www.swig.org).
>> # Version 4.0.2
>> #
>> # Do not make changes to this file unless you know what you are
>> doing--modify
>> # the SWIG interface file instead.
>>
>> from sys import version_info as _swig_python_version_info
>> if _swig_python_version_info < (2, 7, 0):
>>     raise RuntimeError("Python 2.7 or later required")
>>
>> # Import the low-level C/C++ module
>>
>> However, swig 4.1.1 no longer does it:
>>
>> # This file was automatically generated by SWIG (https://www.swig.org).
>> # Version 4.1.1
>> #
>> # Do not make changes to this file unless you know what you are doing -
>> modify
>> # the SWIG interface file instead.
>>
>> from sys import version_info as _swig_python_version_info
>> # Import the low-level C/C++ module
>>
>> Is this a bug, or was this removed on purpose?
>>
>> Thanks a lot,
>>
>> Lluís.
>> _______________________________________________
>> Swig-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/swig-user
>>
> _______________________________________________
> Swig-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/swig-user
>

_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user