On Tuesday, 28 March 2017 23.57.39 WEST José Abílio Matos wrote:
> FWIW the culprit seems to be normalize_font_whitespace in lyx_1_5.py, that
> is used for formats 259 and 274.

I found the reason.

In that function the is a variable called changes that is a dictionary. We 
access to the list of keys of that dictionary with list(changes.keys()) but 
this function does not guarantee the same order return between two different 
python versions. BTW this also applies to python 2 versions.

After reading the code I see that both versions are functionally equivalent. 
:-D

OK this means that we do not have a bug between the two versions, but 
something that we can improve by making the return order stable.

One possible option would be to use

from collections import OrderedDict

and then

changes = OrderedDict()

this guarantees a stable return order...

-- 
José Abílio

Reply via email to