• 
      

    Fix diff error bundle using wrong string type on Python 3.

    Review Request #11960 — Created Jan. 21, 2022 and submitted — Latest diff uploaded

    Information

    Review Board
    release-4.0.x

    Reviewers

    This change fixes bug #4958 by changing zipfile in
    DownloadPatchErrorBundleView to use BytesIO instead of StringIO, which
    makes it work on both Python 2 and 3. Before this change, the view would fail
    when Python 3 was used.

    This change also adds two unit tests for DownloadPatchErrorBundleView that test
    its response when there is or isn't a PatchError raised in rendering the diff.

    A review request with a patch that does not apply cleanly was created.
    The patch error bundle was successfully downloaded when running
    the Review Board dev server on both Python 2 and 3.

    Two unit tests were added for DownloadPatchErrorBundleView that test its
    responses. It was verified that these unit tests fail on release-4.0.x
    when Python 3 is used, and pass on both Python 2 and 3 after this change.

    All unit tests in reviewboard.diffviewer.tests were run and passed on
    both Python 2 and 3.

    Commits

    Files