Changes between Version 11 and Version 12 of Ticket #28344


Ignore:
Timestamp:
09/19/2018 05:21:57 AM (2 years ago)
Author:
Jure Erznožnik
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28344 – Description

    v11 v12  
    1 I'm investigating this ticket for possible implementation at PyCon UK sprints. Initial thoughts:
    2 
    3 I like the pattern suggested above:
    4 
    5 {{{
    6 with obj.lock_for_update():
    7     obj.some_attr = 13
    8 # Would this be auto-saved at the end of the CM's block?
    9 }}}
    10 
    11 However, this one implies both a transaction and an auto-save to me. So my proposal would be to "decorate" the `lock_for_update()` with two parameters:
    12 
    13 * `atomic: bool=True`
    14 * `auto-save: bool=True`
    15 
    16 Would this be an acceptable solution?
Back to Top