feat(hook): make sure to recompute data_format and encoding when the content is changed

Before that patch, and in the context of an update thought a form, the data,
and format as resent.

If the user changes the data, he usually expects the format attribute to be
automatically updated too. But it was not.

With this patch, if the data is changed, and the data_format is the same as
before, we assume it has not been updated by the user, and that it should be
recomputed. On the other hand, if the value is different than the previous
one, we assume it has been changed by the user and we keep this value.
8 jobs for !34 with topic/default/update-data_format in 1 minute and 31 seconds (queued for 5 seconds)
latest detached
Status Name Job ID Coverage
passed black #602730
lint black


passed check-dependencies-resolution #602728


passed check-manifest #602731
lint check-manifest


passed flake8 #602734
lint flake8


failed safety #602732
lint safety allowed to fail


passed twine-check #602727
lint twine


failed flake8 #602729
lint flake8


passed py3 #602733
tests py3


Name Stage Failure
safety Lint
| functionality to make sure that the request matches the RFC7230 standard.    |
| Certain proxy servers may not have this functionality though and users are |
| encouraged to upgrade to the latest version of waitress instead. |
ERROR: InvocationError for command /builds/cubicweb/cubes/file/.tox/safety/bin/python -msafety check --full-report (exited with code 255) (exited with code 255)
___________________________________ summary ____________________________________
ERROR: safety: commands failed
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1