Make use of six iteration functions in more places.

Review Request #9738 — Created March 5, 2018 and submitted

chipx86
Djblets
release-2.0.x
5a59299...
djblets

While we're generally pretty good about using six.iter* functions, we
had a few places where we weren't using them, and instead were calling
methods like .values() and .items() directly, producing different
results on Python 2.x and 3.x. This change makes use of six in these
locations, and documents one location where it appears we can use it but
actually can't due to the object type.

Unit tests pass (along with other changes) on Python 2.7, 3.4, 3.5, and 3.6.

david
  1. 
      
  2. djblets/extensions/extension.py (Diff revision 1)
     
     
     

    Is this because pkg_info defines its own items() method?

    1. Yep. It's a separate thing that didn't gain the iteritems/items divide, and didn't change in Python 3.

  3. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (60af7f7)
Loading...