You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rewritten Python bindings do a bunch of conversion to/from utf8, even though the underlying augeas library does not care whether strings it works on are valid utf8 or not. It seems that that just unnecessarily risks failures when strings are not valid utf8.
@thedrow could you have a look and see if the utf8 stuff is really needed ?
The problem here is that even for Python 2, the mandatory utf8 conversion makes things that used to work break: if a config file contains invalid utf8, augeas is perfectly happy with it, but once the Python bindings try to convert, things blow up.
At least for Python2, there should be no mandatory conversion so as to avoid that; and even for Python3, it would be good to find a way to avoid blowing up just because a file contains invalid utf8 - there's plenty of config files that are valid and processable even if they are not valid utf8.
Activity
thedrow commentedon Nov 12, 2017
This is for Python 3 compatibility. The old Python library did not return byte strings as far as I recall.
lutter commentedon Nov 16, 2017
The problem here is that even for Python 2, the mandatory utf8 conversion makes things that used to work break: if a config file contains invalid utf8, augeas is perfectly happy with it, but once the Python bindings try to convert, things blow up.
At least for Python2, there should be no mandatory conversion so as to avoid that; and even for Python3, it would be good to find a way to avoid blowing up just because a file contains invalid utf8 - there's plenty of config files that are valid and processable even if they are not valid utf8.