I have not yet quite decided how to fix
https://github.com/patchew-project/patchew/issues/117. The two
possibilities are to change properties to a single big JSON
field, or to get rid of JSONField by not encoding the strings.
It may also be possible to have two JSON fields, one for
properties and one for plugin configuration. This one is probably
my favorite, though also not a small endeavour especially because
of migration.
I have prototyped not encoding the strings, it seems to work but it
is ugly. So, in the meanwhile, here are some cleanups to property usage
that should simplify things in general.
Patches 1-3 remove properties that are unnecessary, while
patches 4-6 hide properties a bit more from the API.
Patch 7 finally makes modules use common code for
property->dictionary conversion.
Paolo
Paolo Bonzini (7):
test_import: remove unnecessary assert
tags: remove reviewed property
testing: do not consult the testing.started property
api, patchew-cli: remove commands to directly access properties
tests: remove case insensitive tags test
git: do not return properties from applier-get
mods: refactor extraction of properties into a dictionary
.../0046_reviewed_message_property.py | 29 ++++++++
api/views.py | 25 -------
mod.py | 34 +++++++++
mods/email.py | 14 +---
mods/git.py | 4 +-
mods/tags.py | 5 +-
mods/testing.py | 15 +---
patchew-cli | 65 +-----------------
tests/data/0002-unusual-cased-tags.mbox.gz | Bin 2166 -> 0 bytes
tests/test_import.py | 12 ----
10 files changed, 72 insertions(+), 131 deletions(-)
create mode 100644 api/migrations/0046_reviewed_message_property.py
delete mode 100644 tests/data/0002-unusual-cased-tags.mbox.gz
--
2.21.0
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel