From: Floris Bruynooghe <flub@devork.be>
To: notmuch@notmuchmail.org
Subject: python: Continuing message re-use fix
Date: Mon, 15 Jun 2020 22:58:48 +0200 [thread overview]
Message-ID: <20200615205850.210480-1-flub@devork.be> (raw)
Hi,
This builds on the patch by Anton Khirnov to fix the message re-use
that is possible when accessing messages from a thread. I started
with just addressing my own comments on this patch, but evolved it
into switching the logic around and leave the normal Message object
untouched. Instead I created a new OwnedMessage which is used by
the Thread which does not free itself on __del__(). I think this
is preferable because the other iterators, mainly Database.messages(),
do not allow retrieving messages more than once since the query object
is hidden from the API.
I've left the original commit in this patch series to not alter any
contributions.
Cheers,
Floris
next reply other threads:[~2020-06-15 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 20:58 Floris Bruynooghe [this message]
2020-06-15 20:58 ` [PATCH 1/2] python/notmuch2: do not destroy messages owned by a query Floris Bruynooghe
2020-06-15 20:58 ` [PATCH 2/2] Make messages returned by Thread objects owned Floris Bruynooghe
2020-06-16 11:14 ` python: Continuing message re-use fix David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200615205850.210480-1-flub@devork.be \
--to=flub@devork.be \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).