• Nicolas Dumazet's avatar
    Because we cache so much attribute lookups in local variables, · 07ecaeb3
    Nicolas Dumazet authored
    it is evil to recreate the attributes during _aq_reset.
    
    Scenario:
     * First call to aq_dynamic
     * aq_portal_type = Base.aq_portal_type
        - inner aq_dynamic business
        - causing an aq_reset call
        - Base.aq_portal_type = {}
        - [...]
        - return
    * local aq_portal_type is not anymore Base.aq_portal_type
    
    The symptoms are random, hard to reproduce loud KeyError crashes in
      hasattr(aq_portal_type[aq_key], accessor_name, None)
    that disappear on the second try.
    
    
    git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39750 20353a03-c40f-0410-a6d1-a30d3c3de9de
    07ecaeb3
Base.py 156 KB