• 
      

    Add compatibility with Python 3.9.

    Review Request #11270 — Created Nov. 8, 2020 and submitted

    Information

    Djblets
    release-2.0.x

    Reviewers

    Python 3.9 removed a couple of deprecated functions/arguments that we
    used, which was the only thing preventing us from claiming Python 3.9
    support.

    This change updates our usage of json.loads() to not pass an
    encoding= argument (removed in Python 3.9) and to instead handle
    decoding byte strings up-front, and to update unit tests to not depend
    on an internal, deprecated method on HTMLParser.

    setup.py has been updated to reflect the current supported list of
    Python versions.

    Unit tests pass.

    Summary ID
    Add compatibility with Python 3.9.
    Python 3.9 removed a couple of deprecated functions/arguments that we used, which was the only thing preventing us from claiming Python 3.9 support. This change updates our usage of `json.loads()` to not pass an `encoding=` argument (removed in Python 3.9) and to instead handle decoding byte strings up-front, and to update unit tests to not depend on an internal, deprecated method on `HTMLParser`.
    995541a256c5210e50ca22d5052933e07a1683b0
    Description From Last Updated

    Is this really something that can happen? It seems like if we had double-encoded JSON, once it's in unicode, loadsing …

    daviddavid
    david
    1. 
        
    2. djblets/db/fields/json_field.py (Diff revision 1)
       
       
       
      Show all issues

      Is this really something that can happen? It seems like if we had double-encoded JSON, once it's in unicode, loadsing it should stay in unicode.

      1. Probably. I was just keeping the same logic. I'll change it.

    3. 
        
    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (dde5b99)