Message 75576

Author
ced
Date
2022-04-10.19:59:00
Message id
75576

Content

On 2022-04-10 19:27, Nicolas Évrard wrote:
> >Cédric Krier <cedric.krier@b2ck.com> added the comment:
> >
> >As we discussed there is no valid case where the depend's should be computed
> >in the `__setup__`.
> 
> I am not talking about that.
> 
> The scenario is:
> 
>      - someone has some modules installed. The different depends properties are
>        cached
>      - someone activate a new module that modifies the states of an existing
>        field (eg adding some readonly conditions) adding some PYSON expression.
> 
> As the properties are cached the new fields might not be found in the depends
> properties.

When a new module is activated, the models are setup again and every
field is deepcopied. So normally the original field should not any
cached properties.

> >We can for case where it is support clear the properties "just in case".
> 
> What's your proposition to clear on old versions of werkzeug?

I do not want to clear. Indeed I see the clearing as a safe guard in
case someone write bad code. But it will even be better to have an
assert if something was cleared.
History
Date User Action Args
2022-04-10 19:59:01cedsetrecipients: + nicoe
2022-04-10 19:59:01cedlinkissue11399 messages
2022-04-10 19:59:00cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)