See here:
https://www.mail-archive.com/search?l=mid&q=a7960223ee91696e916b281d1d9fc55df10a9480.camel%40gmail.com
Description from José pasted below:
Functions `length_in_bp` and `revert_flex_inset` have an error in a
(almost) never used path. The reason why this was never triggered is
because this is part of the code where we try all the best efforts
to recover from an ill-formed LyX file.
The problem is that the functions call the `document` variable to
issue an warning if the file does not follow the usual structure.
The simple fix is to add that variable (as the first for the
functions) and to add them at all the places where the functions are
called.
For reference this code was introduced by Georg (Baum) more than 8
years ago and it was never reported. So the issue is not urgent in
any meaningful way. :-)
In `lyx2lyx/lyx_2_0.py`, in the function `revert_nameref`, there is
a call to the document variable. The same as all the above.
In `lyx2lyx/lyx_2_4.py`, in the `class fontmapping`. Similar to the
above but now for error.
Most of the changes are related with dictionaries returning views instead of
lists.
xrange -> range (since xrange is gone in python 3)
The code that is special to support both python 2 and 3 is enclosed in a comment
\# Provide support for both python 2 and 3
and
\# End of code to support for both python 2 and 3
And so later it can be removed safely when python 2 is no longer supported.
The calls are now made to string methods, the advantage being that they work with
unicode strings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14537 a592a061-630c-0410-9148-cb99ea01b6c8
Add a documentation string to each module.
Add a documentation string to every function in the modules.
file is a python reserved word => s/file/document/g as variable
add a new property to modules, supported_versions that holds
the versions supported by that module
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14534 a592a061-630c-0410-9148-cb99ea01b6c8
* lyx_1_1_5.py
* lyx_1_2.py
* lyx_1_3.py
* lyx_1_4.py
* lyx_1_5.py
* parser_tools.py: remove functions that are not generic, i.e.
assume a specific pattern for the file format, and move them to the
places where they are used.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14503 a592a061-630c-0410-9148-cb99ea01b6c8
and using it as library. The lyx2lyx script now becomes a simple cliente.
Simple fix in the UserGuide.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8941 a592a061-630c-0410-9148-cb99ea01b6c8