Skip to content

Python bindings unnecessarily convert to/from utf8 #34

Open

Description

@lutter

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 ?

Activity

  1. thedrow commented on Nov 12, 2017

    @thedrow
    Contributor

    This is for Python 3 compatibility. The old Python library did not return byte strings as far as I recall.

  2. lutter commented on Nov 16, 2017

    @lutter
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions