Hi all,
        I suggest to update the python code used by lyx to support both python 
2 and python 3 with the same code.

For those who (did not) read the summit notes from Guido:
http://thread.gmane.org/gmane.comp.python.devel/147048

There is one point particularly that I noticed:
"- The recommended and least painful way to develop for Python 2 and 3 is 
definitely to use a single source that runs under both without translation; we 
no longer recommend auto-generating Python 3 compatible source code using 2to3, 
for a variety of reasons. Several people attested that single-source has worked 
well for them; Mercurial is using the 2to3 approach but they're not too happy 
with it."

We have already a ticket opened for this:
http://www.lyx.org/trac/ticket/9006

Also of notice for some of the points raised in the ticket regarding python 2.7 
support:
"- We should make an effort to publicize that we're NOT sunsetting Python 2.7 
just yet; support will continue (hopefully with ample support from distro 
vendors), and someone should update PEP 373. (Unclear what the new EOL is but 
we should definitely rescind the currently published schedule.)"

As you can see here:
http://legacy.python.org/dev/peps/pep-0373/
"The End Of Life date (EOL, sunset date) for Python 2.7 has been moved five 
years into the future, to 2020."

So IMHO I suggest code that is able to support both python 2 and python 3.

Before proceeding here there two related issues that we should discuss:

What is the minimum python 2 version that we will support?

What is the minimum python 3 version that we will support?

My suggestions are python 2.7 and python 3.3 as the minimal versions. Since I 
suggest to support both versions that means that you only need to have one of 
them available.

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.

Regards,
-- 
José Abílio

Reply via email to