• Jérome Perrin's avatar
    *: refactor edit_order of Base._edit · 6c2bffed
    Jérome Perrin authored
    Instead of overriding the method and adjusting edit order in some class,
    define "_default_edit_order" as a class value and use it in Base._edit
    as default value when caller do not explicitly pass edit_order.
    
    This was made to keep the default edit order consistent with the order
    of edits on python2 for properties where the edit order matters.
    
    This affects mostly scripts, when for example in a script we do:
    
      delivery.edit(start_date=d, stop_date=d)
    
    on python2 without PYTHONHASHSEED, stop_date is also set, so we keep
    this behavior (that is assumed by some tests).
    
    We also change the order of edit for other properties not constraint
    by edit_order to edit them in alphabetic order, to have a constant
    deterministic behavior.
    Co-authored-by: Kazuhiko Shiozaki's avatarKazuhiko SHIOZAKI <kazuhiko@nexedi.com>
    6c2bffed
variated.py 16.9 KB