- Group Reviewers
- rDMOD85ca7d784800: model: use attrs_static to enforce type validation of model objects
I don't hate the idea (although we're missing a Debian package for this). I've suggested a few changes.
I don't understand the "runtime validation" comment in the diff description. AFAIK validators from attrs _are_ indeed run when the objects are instantiated (and the documentation seems to back me up).
looks like something that doesn't exist (yet?)
Can we get a proper name for this function? something like attrib_typecheck would be way more sensible.
It'd also be nice to support extra validators to be passed as arguments (though I guess our current attributes with validators are already stricter than a plain typecheck). If we do that then we can have all our attributes use this consistently, I guess.
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tox/216/
See console output for more information: https://jenkins.softwareheritage.org/job/DMOD/job/tox/216/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tox/217/
See console output for more information: https://jenkins.softwareheritage.org/job/DMOD/job/tox/217/console
Build is green
Patch application report for D2819 (id=10440)
Rebasing onto e9a4c7519e...
Current branch diff-target is up to date.
Changes applied before test
commit 85ca7d7848008951f2e26c55c1c72ed9fa92cefb Author: David Douard <email@example.com> Date: Fri Mar 20 12:59:56 2020 +0100 model: use attrs_static to enforce type validation of model objects This ensures all instanciated model entities have valid types for attributes. Related to T2308.
See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/18/ for more details.