Here is a first patch for python 2 & 3 compatibility of configure.py and 
prefs2prefs.py which are among the most central python scripts.

I did not push the changes because of the “open” function (in prefs2prefs) 
which had to be changed from binary mode to text mode (otherwise, regular 
expressions cannot be applied). I tested them with both python 2 and 3, and did 
not find any problem with this, but would like some feedback before applying 
this patch.
 
Benjamin

On 22 Apr 2014 at 09:15:00 , 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  


Reply via email to