• 
      

    Fix the custom unpickler on Python 2.x.

    Review Request #10559 — Created May 21, 2019 and submitted

    Information

    Django Evolution
    master

    Reviewers

    The custom unpickler was previously only being used on newer versions
    of Python and Django. However, a recent change resulted in it being
    imported on Python 2.x as well, and it turns out that this wasn't
    actually compatible on 2.x. We were making use of pickle._Unpickler
    Python implementation as the parent class (Python 3.x exposes a native
    implementation of the unpickler as Unpickler), while 2.x didn't have
    this. Furthermore, we were calling super on it, which didn't work on
    2.x in that Unpickler was an old-style class.

    This fixes up the compatibility issues to work on both versions.

    Unit tests pass on Python 2.x and 3.x.

    Summary ID
    Fix the custom unpickler on Python 2.x.
    The custom unpickler was previously only being used on newer versions of Python and Django. However, a recent change resulted in it being imported on Python 2.x as well, and it turns out that this wasn't actually compatible on 2.x. We were making use of `pickle._Unpickler` Python implementation as the parent class (Python 3.x exposes a native implementation of the unpickler as `Unpickler`), while 2.x didn't have this. Furthermore, we were calling `super` on it, which didn't work on 2.x in that `Unpickler` was an old-style class. This fixes up the compatibility issues to work on both versions.
    6e628870943bcdbcbce4174bee8f7f04c1dfe75f
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (f4b54ff)