• 
      

    Support buffer/memoryview types in Base64Field.

    Review Request #10843 — Created Jan. 21, 2020 and submitted — Latest diff uploaded

    Information

    Djblets
    release-2.0.x

    Reviewers

    Django can end up giving us a buffer (Python 2.x) or memoryview
    (Python 3.x) value when instantiating a field from a row in the
    database. This wasn't supported in Base64Field, and led to breakages
    in one part of the administration UI.

    This extends Base64Field to work correctly with a six.memoryview
    (which maps to the correct type on both versions of Python). Unit tests
    ensure that all the type-specific behavior will work correctly when
    provided with these values.

    Unit tests pass on all supported versions of Python.

    Verified that I was able to load the objects in the administration UI
    that were triggering this bug.

    Commits

    Files