On Apr 22, 2014 3:15 AM, "Guenter Milde" <[email protected]> wrote:
>
> On 2014-04-22, Pavel Sanda wrote:
> > José Matos wrote:
>
> >> Before proceeding with the changes we should add tests to guarantee
> >> that the code works as intended on both versions.
>
> >> I do not intend to work on this until the end of the semester (mid
> >> June FWIW) but I would like to start the discussion here.
>
> > The more versions supported the bigger maintenance burden. I would
> > think twice whether we should simply switch just to python 3. (I hope x
> > in 3.x doesn't matter much, right?)
>
> I also vote for keeping compatibility with both 2.7 and 3.x (x >=3) for
the
> next couple of LyX versions:
>
> * There are still a lot of installations, where
>   2.7 (or older) is the default Python version.
>
> * As we can have one common source for both major versions, the added
burden
>   is managable.
>
> I am also willing to help, if required.
>
> Günter
>
>

For most code, using a common source shouldn't cause problems between the
2.7 and 3.X versions of Python. In certain cases where problems could
arise, such as with print statements, it is possible to write code that is
in the style of 3.X but is still compatible with 2.7 by importing the
proper items from the __future__ module. For other cases, which I believe
to be relatively few, we should be fine for the most part detecting the
version of Python and running version-specific code in those cases. I
imagine that the biggest issues that would arise would probably be caused
by using third-party modules that haven't been updated to work with Python
3.X yet.

Josh

Reply via email to