Comment 7 for bug 1721432

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to oslo.context (master)

Reviewed: https://review.openstack.org/511026
Committed: https://git.openstack.org/cgit/openstack/oslo.context/commit/?id=e75f4c5ad91962e272d65daa770e00f70f931ecb
Submitter: Zuul
Branch: master

commit e75f4c5ad91962e272d65daa770e00f70f931ecb
Author: Ben Nemec <email address hidden>
Date: Tue Oct 10 20:40:34 2017 +0000

    Make from_dict extensible

    Some of our consumers define additional members on the context class
    that they want included in to_dict and from_dict. While it is
    possible to do this today via overrides of those functions, the
    from_dict implementation in particular is a little non-obvious.
    This has led to bugs when the base class's to_dict behavior changes.

    This change moves the logic around extending the keys recognized by
    from_dict into from_dict itself and allows consumers to simply
    provide a list of those keys by overriding a class member.

    Change-Id: Ib143f8a5c129dbf6711800c4d87c8830a8aa3365
    Related-Bug: 1721432