Fish Trophy

chipx86 got a fish trophy!

Update remaining diff viewer code for Python 3.

Review Request #10501 — Created April 2, 2019 and updated

chipx86
Review Board
release-4.0.x
reviewboard

This updates some remaining bits of code in the diff viewer to work with
both Python 2 and 3. This involves:

  1. Switching to alternative methods for chunk building (working around
    behavioral changes in map and partial)

  2. Removing usage of StopIteration (which no longer behaves the same
    way and is deprecated)

  3. Fixing a comparison between a string and an integer in chunk
    generation.

  4. Fixing the building of strings and other data in tests to get the
    correct types and to work with Python 3's formatting restrictions.

Unit tests pass on Python 2.7 and 3.7 (with other in-progress changes).

Summary
Update remaining diff viewer code for Python 3.
Description From Last Updated

F821 undefined name 'force_text'

reviewbotreviewbot

Can you fix up this docstring while you're in here?

daviddavid
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
Review request changed

Change Summary:

Added a missing import that wasn't staged for commit.

Commits:

Summary
-
Update remaining diff viewer code for Python 3.
+
Update remaining diff viewer code for Python 3.

Diff:

Revision 2 (+100 -56)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. 
      
  2. reviewboard/diffviewer/chunk_generator.py (Diff revision 2)
     
     
     
     
     

    Can you fix up this docstring while you're in here?

    1. I'd like to do some doc cleanup work, but there's a lot more than just this that needs love. Since no arguments were changed here, I'd rather do this in a separate doc cleanup change.

    2. Sure.

  3. 
      
david
  1. Ship It!
  2. 
      
Loading...