• 
      

    Allow API responses to encode a set().

    Review Request #12385 — Created June 17, 2022 and submitted

    Information

    Djblets
    release-3.x

    Reviewers

    By default, Python's json module can't encode a set. This hasn't
    historically been a problem for us, but with the introduction of code
    safety checks in Review Board, we're now trying to encode sets in
    responses.

    This change adds formal support for a set in all of our JSON
    serializers, including that for the API. The set is turned into a
    sorted list of items.

    Unit tests passed.

    Verified that I could retrieve API results containing encoded sets.

    Summary ID
    Allow API responses to encode a set().
    By default, Python's `json` module can't encode a `set`. This hasn't historically been a problem for us, but with the introduction of code safety checks in Review Board, we're now trying to encode `set`s in responses. This change adds formal support for a `set` in all of our JSON serializers, including that for the API. The `set` is turned into a sorted list of items.
    6fa43ed9d3e0c4be17ad3f98bd627de4013be690
    maubin
    1. Ship It!
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.x (5c47340)