From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eKLJEQK0kmTyHQEASxT56A (envelope-from ) for ; Wed, 21 Jun 2023 10:25:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QG7vEQK0kmSzGAAA9RJhRA (envelope-from ) for ; Wed, 21 Jun 2023 10:25:38 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 A766D1787F for ; Wed, 21 Jun 2023 10:25:37 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 267C35F707; Wed, 21 Jun 2023 08:25:35 +0000 (UTC) X-Greylist: delayed 439 seconds by postgrey-1.36 at yantan; Wed, 21 Jun 2023 08:25:33 UTC Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 378E45F6BF for ; Wed, 21 Jun 2023 08:25:33 +0000 (UTC) Received: from meesny.iki.fi (meesny.iki.fi [IPv6:2001:67c:2b0:1c1::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lahtoruutu.iki.fi (Postfix) with ESMTPS id 4QmGbT5x8nz49Q6W for ; Wed, 21 Jun 2023 11:18:13 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1687335493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cBRdc4cyqidunwdkvf3QYZZy5yi/nrx83Y4ii4jVR+4=; b=u+DoGliFOnNZqz0QS7jtViHNY7Sxp/cclmjM1JCdf3/Cm0YZTrDQESeWhvcUIobQf/9OSy P8/VKyJfoIHKdp+92oscSIGIqEWr4nJun/GCQfVx+O8AIPe534ZHmBlu0f7KqsVU73SC0g RJZJOV2aYs4TlKGTQcQvdJLagsZQcaboaVabNz5fGA94xy3UowAiJ4tYmO3bK0x5FiAJrP rUy54i3J9txdf52myB9CQJAVMmAwgyozOeQnGD42jbZmVmKVxaOmPeSrgNMw3wqoE0K2cW sTxZYERL1sRAXfGJ1nkfycHJN0+TwkC5n0BlyoUSAViOvgU5aIlU7rfri/By9Q== Received: from c53 (gw1.nor.fi [185.218.193.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: too) by meesny.iki.fi (Postfix) with ESMTPSA id 4QmGbP5ZdPzybB; Wed, 21 Jun 2023 11:18:09 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1687335491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cBRdc4cyqidunwdkvf3QYZZy5yi/nrx83Y4ii4jVR+4=; b=AS87WFPb2f378VBYpeLmVX+rW8tATLJlUZ30b1V0wXzo4JY9XondMb3UMPWlMC73AmsP6X feR9XkZDGkoWMJJI5shVMr11WvZNI27R/TH7ubOLU28nANjtfBcBuzwLm9ah7bRHT8bVH3 yITZCzBGeW4qrszBecwcj0an6W/eqcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1687335491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cBRdc4cyqidunwdkvf3QYZZy5yi/nrx83Y4ii4jVR+4=; b=sd0HJZ5C/XbIYHz9hc6Q7qJsPb2f/dEZCGPxS09J/iojRev9gMpUpvjtnHHShQ3I5LhVUs 7eTU6aZoLAqYgv9/H+APCieYKdr7NvP9dw1UzJaXTIyptZ5xLmrudF8w4zpg4M5tUtVONb 8apIPN6yWbuVzNMqk50ssSfMYQ30GCU= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1687335491; a=rsa-sha256; cv=none; b=VVKjNLg0Yn93neoWxeKyr8nfF9783B72K8ATCs6suH1+54596ONhLx2jSFv2fS2Q//RlG8 GsRi/aPFFiH5QiMPi6qjrVHAfP4yP2DUWK+8gehswvxNvIjB/ofYB6K9mXX94NsPpZ0X+N pC/iQFs0pmJlAlVWm8G+A7iAG/pQY3A= From: Tomi Ollila To: michaeljgruber+grubix+git@gmail.com, notmuch@notmuchmail.org Subject: Re: [PATCH] python: adjust legacy bindings to py 3.12 In-Reply-To: References: User-Agent: Notmuch/0.37+27~gff8ef59 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 Message-ID-Hash: M23VYKLZHQPBHFVAPEMI2UELYRBJZ4YC X-Message-ID-Hash: M23VYKLZHQPBHFVAPEMI2UELYRBJZ4YC X-MailFrom: tomi.ollila@iki.fi 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 CC: Michael J Gruber 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: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687335937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=LyQnafXRRD+QLYPnqG1hKZbhj6YeHqfaazhaxUAEFX8=; b=hHWMyrV3ipEfVeWUW179eH8JAQUrJQL+vDT4/B7ZuNBIQ8ob80qwexfw1WJFmiVSxIIMOj fCb5adjC1fGB1Jj3P1EPP01tEO2nXSrisp5LvrR84RqP/8+RIPhCMJijQcm/+RGjp0M7iy HuoBDkueqwgaVMRDeDkqr4OOQQltjCT6kdrVwLs2F1hoRFJjt4zDIBwE+jEXVg04fZ5PL/ qvy1cjR/hXQCWKf9o/qkDAQRDkEQALg3QP19fof1f4g5Rho/2ajc4Vklw1bPoDjhAVmQvN M2/ZMM4Hs4gWNyHoOKZjxbtSuWMDa2YZBSEYhBa4ceQ3FbvV5uxAR+LeNFPt5g== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=u+DoGliF; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=AS87WFPb; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1687335937; a=rsa-sha256; cv=fail; b=cL6VMribb2GJc3YSDz2rBpP9egf6GvY26mmt5hYDA5UOaxURCRrUpFbic2TEzq+bwSCm25 g0vB8dDSRC+gIpZQMV/9HEZxK12UhkNS+sGPg50RZiLEOGCmKmIS8V2znEIMXz6cA7477Z NI568a7SqU9XOXt874KdYZP8r0PFs/ZHj3o/FcZuU7776vYP61zFYz+q17yTEyY+nWNBlX MjMPKgaDDjSH0fgObzElmqZrOV5nF8m7RI6RH7wAFhSz3VTT2OfWjGBG0BvtdEg9p2ycrr JfSpZkpMTL81NAgEo4210r73HZUjvFMXjEnunmnX4Vo+yTbnmr0NIUlwirVdqw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=u+DoGliF; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=AS87WFPb; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}") X-Migadu-Queue-Id: A766D1787F X-Spam-Score: 0.32 X-TUID: l5X0RYI4GEgG On Fri, Jun 16 2023, michaeljgruber wrote: > From: Michael J Gruber > > Py 3.12 finally pulled the plug on the `SafeConfigParser` class which > has been deprecated since py 3.2. > > We use it in the legacy bindings only, so take the easy route of > importing `ConfigParser` as `SafeConfigParser` and monkey-patching so > that the class has the expected interface. IMO LGTM in this particular case. Tomi > --- > bindings/python/notmuch/compat.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/bindings/python/notmuch/compat.py b/bindings/python/notmuch/compat.py > index c931329e..4a94e05c 100644 > --- a/bindings/python/notmuch/compat.py > +++ b/bindings/python/notmuch/compat.py > @@ -47,7 +47,10 @@ if sys.version_info[0] == 2: > > return value > else: > - from configparser import SafeConfigParser > + from configparser import ConfigParser as SafeConfigParser > + > + if not hasattr(SafeConfigParser, 'readfp'): # py >= 3.12 > + SafeConfigParser.readfp = SafeConfigParser.read_file > > class Python3StringMixIn(object): > def __str__(self): > -- > 2.41.0.169.g493b9e920c > > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org