From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UM5eMrmp6F4TJwAA0tVLHw (envelope-from ) for ; Tue, 16 Jun 2020 11:15:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gGNILrmp6F4FHgAA1q6Kng (envelope-from ) for ; Tue, 16 Jun 2020 11:15:05 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1FB2794030A for ; Tue, 16 Jun 2020 11:15:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2AF066DE0286; Tue, 16 Jun 2020 04:14:59 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vMdALgSMQMDu; Tue, 16 Jun 2020 04:14:58 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 93EF86DE02AC; Tue, 16 Jun 2020 04:14:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2409C6DE02AC for ; Tue, 16 Jun 2020 04:14:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VbiyvCXR5MtZ for ; Tue, 16 Jun 2020 04:14:55 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 2E4966DE0286 for ; Tue, 16 Jun 2020 04:14:55 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.92) (envelope-from ) id 1jl9YJ-0001IU-6c; Tue, 16 Jun 2020 07:14:51 -0400 Received: (nullmailer pid 915393 invoked by uid 1000); Tue, 16 Jun 2020 11:14:50 -0000 From: David Bremner To: Floris Bruynooghe , notmuch@notmuchmail.org Subject: Re: python: Continuing message re-use fix In-Reply-To: <20200615205850.210480-1-flub@devork.be> References: <20200615205850.210480-1-flub@devork.be> Date: Tue, 16 Jun 2020 08:14:50 -0300 Message-ID: <87366vw9cl.fsf@tethera.net> MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -1.01 X-TUID: fXFXzsmSZVZd Floris Bruynooghe writes: > 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 Revised series merged to master and release. Thanks for your help with these updates. d