We have upgraded to the latest web2py version 2.18.5 (from a very old 2.12.3) and also changed from Python 2 to 3.
Most things are working fine but we have one major issue: from time to time a language file gets overwritten. We did not experience this problem before.
In a model file we explicitly set T.is_writable to False. After determining the used language we set the flag:
T.force(session_language)
T.is_writable = False
When the language file is overwritten usually only one or two labels are added to the file. But sometimes it happens that the language file only contains the new label and then all translations are lost.
How is it possible that web2py overwrites the language file when we set the is_writable flag? are there any possible race conditions as this problem only occurs very rarely?
For now we changed the file owner of the language files to root so web2py cannot corrupt our translation files but of course this is only a temporary workaround. Any ideas?
Alex