Skip to content
  • Stephen Finucane's avatar
    py3: "Modernize" code base · d02ed150
    Stephen Finucane authored
    
    
    Run code through the 'modernize' application to fix Python 3
    compatibility while also retaining Python 2 backwards compatibility.
    
    There are some key changes made to the autogenerated code:
    
    * Don't wrap 'items()' in 'list' for for loops - it's not necessary
    * Don't wrap 'keys()' in 'list' - just drop 'keys()'
    * Use Django's version of six rather than the upstream one
    
    Many of the issues found are based upon the changed definitions of the
    map, keys and items functions, along with the removal of the iteritems
    function and reduce keyword.
    
    v2: Port to fdo's patchwork (Damien)
    
    Signed-off-by: default avatarStephen Finucane <stephen.finucane@intel.com>
    Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
    d02ed150