From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sIYuBJlZd2HiBwAAgWs5BA (envelope-from ) for ; Tue, 26 Oct 2021 03:27:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MJR4O5hZd2GvawAAB5/wlQ (envelope-from ) for ; Tue, 26 Oct 2021 01:27:52 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6F5542FBC9 for ; Tue, 26 Oct 2021 03:27:52 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D70BD1F549; Mon, 25 Oct 2021 21:27:48 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id CF7B91F544 for ; Mon, 25 Oct 2021 21:27:41 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id A691E5FC42; Mon, 25 Oct 2021 21:27:41 -0400 (EDT) Received: (nullmailer pid 3147497 invoked by uid 1000); Tue, 26 Oct 2021 01:27:40 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: problem with message headers in python bindings X-List-To: notmuch Date: Mon, 25 Oct 2021 22:27:40 -0300 Message-ID: <87h7d4wp6b.fsf@tethera.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Message-ID-Hash: KZNOWHOMBN7DJ57JPARBAKQZIKG45IIO X-Message-ID-Hash: KZNOWHOMBN7DJ57JPARBAKQZIKG45IIO X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635211672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type:list-id: list-help:list-owner:list-unsubscribe:list-subscribe:list-post; bh=5uH5C/mugDodggSYpYtAydTQBWZ+LSTCkgg+95CFgXE=; b=feTuik/Oza3h5shEyJi5wuLHWd3sg+gyU2umJKOg0J1Z6DPiArUt0+hHLI3h9Da57C8DyY ynnd48wfAHXdl9+Qt11Hr/aJ8UHS20IzecB+ahttcZ2XAZUq9b+80e9lNwA5S/7mj0TbyC X/mQuYkCBNF5XHm4yZvHc9zVRJuvBHRerdTLq+h0MZ0v6F/6g/r+fs6ZJvepSu/7GSGXC4 7A18SKYXUFLdkKYeNiNZnBMRe0ZwrGMY1Ak50GHAE9WFow6dd1SiMHnSy3Mto+v5hFanFE uRrTzbHjKqKNGVhRDqG/2hIpXUlBqQDhw73drcZZzpAqOcxSpw1DXp9Qs9sNKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635211672; a=rsa-sha256; cv=none; b=re60GtOO2Hhw1wioIJtVz/NdIg8w/oSp7Ypu18vvG4AQXXeD994erZF8XVZD/HE2zJnv6t On6hFzuJdJr6SxdxRVo3pkT+BEbAO5HCLFryJTRuhEsD2HXTSdtXbcM1NhpRUt67pxZtkX C59VQMlth2EA2vZ0AFJntwL6AuamMddcw/9UZFE9VZt2Zp+hwSDsf6oT/nEXI1PW0T1AuT Z1w2KoCuM5iyMC17kt/R62i6l2tbp4vDuOJDNO8cS8jkOTosVQwelQE3YvsIhaHN9iszkC K7BB3EHjry8zkXzw9sAW4N4aPuk3A8gk2GMI8/qndnRylWrzjz6UTx0DrEGfJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.15 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 6F5542FBC9 X-Spam-Score: -2.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: sj43pq9gCh47 --=-=-= Content-Type: text/plain On a host running Debian Stable with python 3.9.2, and notmuch 0.31.4, both of the attached programs work fine. On my developement host running notmuch 0.34, both segfault when trying to fetch the 'to' header. This invokes a more complicated code path, which seems to have broken sometime between 0.31.4 and 0.34. I guess something changed in the library that the bindings need to catch up with. --=-=-= Content-Type: text/x-python Content-Disposition: inline; filename=test.py import notmuch2 db=notmuch2.Database() m=db.find('20211026002252.2823593-1-austin@austinray.io') frm=m.header('from') print(frm) to=m.header('To') print(to) --=-=-= Content-Type: text/x-python Content-Disposition: inline; filename=test2.py import notmuch db=notmuch.Database() m=db.find_message('20211026002252.2823593-1-austin@austinray.io') frm=m.get_header('from') print(frm) to=m.get_header('To') print(to) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --=-=-=--