aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings
diff options
context:
space:
mode:
authorGravatar Justus Winter <4winter@informatik.uni-hamburg.de>2012-04-30 18:48:29 +0200
committerGravatar Justus Winter <4winter@informatik.uni-hamburg.de>2012-04-30 19:27:36 +0200
commite9bcbe7e70d0811f11e58466735b2bf7c8f0a3fc (patch)
tree7f31939b4b74ff4276fdf5878112d88d10caa60c /bindings
parent7f74a400d197dac5cdf36960f68f63ce3eeff486 (diff)
python: deprecate code formatting messages as text and json
This code adds functionality at the python level that is unlikely to be useful for anyone. Furthermore the python bindings strive to be a thin wrapper around libnotmuch, so this code will be removed in notmuch 0.14. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Diffstat (limited to 'bindings')
-rw-r--r--bindings/python/notmuch/message.py31
1 files changed, 28 insertions, 3 deletions
diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
index 4ec5147b..0e65694e 100644
--- a/bindings/python/notmuch/message.py
+++ b/bindings/python/notmuch/message.py
@@ -614,7 +614,15 @@ class Message(Python3StringMixIn):
"""Create an internal representation of the message parts,
which can easily be output to json, text, or another output
format. The argument match tells whether this matched a
- query."""
+ query.
+
+ .. deprecated:: 0.13
+ This code adds functionality at the python
+ level that is unlikely to be useful for
+ anyone. Furthermore the python bindings strive
+ to be a thin wrapper around libnotmuch, so
+ this code will be removed in notmuch 0.14.
+ """
output = {}
output["id"] = self.get_message_id()
output["match"] = self.is_match()
@@ -660,12 +668,29 @@ class Message(Python3StringMixIn):
def format_message_as_json(self, indent=0):
"""Outputs the message as json. This is essentially the same
as python's dict format, but we run it through, just so we
- don't have to worry about the details."""
+ don't have to worry about the details.
+
+ .. deprecated:: 0.13
+ This code adds functionality at the python
+ level that is unlikely to be useful for
+ anyone. Furthermore the python bindings strive
+ to be a thin wrapper around libnotmuch, so
+ this code will be removed in notmuch 0.14.
+ """
return json.dumps(self.format_message_internal())
def format_message_as_text(self, indent=0):
"""Outputs it in the old-fashioned notmuch text form. Will be
- easy to change to a new format when the format changes."""
+ easy to change to a new format when the format changes.
+
+ .. deprecated:: 0.13
+ This code adds functionality at the python
+ level that is unlikely to be useful for
+ anyone. Furthermore the python bindings strive
+ to be a thin wrapper around libnotmuch, so
+ this code will be removed in notmuch 0.14.
+ """
+
format = self.format_message_internal()
output = "\fmessage{ id:%s depth:%d match:%d filename:%s" \