csomh / source-git / rpm

Forked from source-git/rpm 4 years ago
Clone

8416ed Monkey-patch .decode() method to our strings as a temporary compat crutch

3 files Authored by Panu Matilainen 4 years ago, Committed by Hunor Csomortáni 4 years ago,
    Monkey-patch .decode() method to our strings as a temporary compat crutch
    
    As a temporary crutch to support faster deployment of the sane
    string behavior on python3, monkey-patch a decode method into all
    strings we return. This seems to be enough to fix practically all
    API users who have already adapted to the long-standing broken API
    on Python 3. API users compatible with both Python 2 and 3 never needed
    this anyway. Issue a warning with pointer to the relevant bug when the
    fake decode() method is used to alert users to the issue.
    
    This is certainly an evil thing to do and will be removed as soon as
    the critical users have been fixed to work with the new, corrected
    behavior.
    
        
file modified
+3 -0
file modified
+1 -0
file modified
+19 -2