Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python bindings unnecessarily convert to/from utf8 #34

Open
lutter opened this issue Nov 11, 2017 · 2 comments
Open

Python bindings unnecessarily convert to/from utf8 #34

lutter opened this issue Nov 11, 2017 · 2 comments

Comments

@lutter
Copy link
Member

lutter commented Nov 11, 2017

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 ?

@lutter
Copy link
Member Author

lutter commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@lutter and others