Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mihxc-0004sS-FZ for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Nov 2021 18:59:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mihx4-0003LB-Ox for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Nov 2021 18:59:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mihx4-0003L1-Fk for pgsql-hackers@lists.postgresql.org; Thu, 04 Nov 2021 18:59:06 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mihww-0006nQ-Kv for pgsql-hackers@postgresql.org; Thu, 04 Nov 2021 18:59:05 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 916ED5C013C; Thu, 4 Nov 2021 14:58:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 04 Nov 2021 14:58:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=FuyWm++1G+JctTvXA8pyNz/iyrlIXIgCUKu0yUU6U WU=; b=W0wHo9yaq31ws2f+9BzG6KnUpVhqHheb/N+Ayp/vtwrUzk8Iz/A8qpo1b +QLRCGdTNCXgtTaBmaXLb5Laxy9LeBZxJfPPFQHhPbrdydpwwm6bR8rhjdS5WwaQ d/ZvIjaD5Er/YvQ5E4ZJQ7Q0qGZSTI6yMnTIfEYXYdlZK5kMhpZS6YXRJ4YthMxc OZINXel2N4bgLvntU1Ekip+2qL62VMjs80rTrx1RVsROnIKMgutX+5l6uK5ephMJ gAqRtNJprU0NUPdCr0oyZmjWAKg4dJP+rKqyfTf80nFgOLhOwj5EpyjokvHTaxbc +siOPcDVahkHj8pfKxOHlrGQYlXUw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtdeggdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffhvfhfkffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepueeltdegheevgeekgffg heeutdegleevheekleeuleeiveeuveeuvdffuddugfetnecuffhomhgrihhnpehpohhsth hgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvug gsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Nov 2021 14:58:55 -0400 (EDT) Subject: Re: Time to drop plpython2? From: Peter Eisentraut To: Andres Freund , pgsql-hackers@postgresql.org References: <20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de> <08a65981-7fec-1b9b-4061-6e3086c05914@enterprisedb.com> Message-ID: <3fc1211d-960b-4b2f-3e96-a6099db847fc@enterprisedb.com> Date: Thu, 4 Nov 2021 19:58:54 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <08a65981-7fec-1b9b-4061-6e3086c05914@enterprisedb.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I see you have posted a patch for this in the meson thread (https://www.postgresql.org/message-id/attachment/127770/v5-0003-plpython-Drop-support-python2.patch). Here is my review of that. I would change the search order in configure from PGAC_PATH_PROGS(PYTHON, [python python3 python2]) to PGAC_PATH_PROGS(PYTHON, [python3 python]) This makes sure you don't accidentally pick up a "python" binary that points to Python 2. This would otherwise immediately generate lots of build failures on older platforms that still have Python 2 around. You left two FIXME sections in plpython.h. AFAICT, we can make the substitutions corresponding to those #define's in the source code and remove those blocks. src/pl/plpython/expected/README should be updated for the removed files. Some documentation updates are needed. I see possibly relevant text in the following files: hstore.sgml install-windows.sgml installation.sgml json.sgml libpq.sgml plpython.sgml ref/comment.sgml (examples) ref/create_transform.sgml (examples) ref/drop_transform.sgml (examples) standalone-profile.xsl src/tools/msvc/ has lots of Python-related content. More stuff to clean up: contrib/hstore_plpython/.gitignore contrib/jsonb_plpython/.gitignore contrib/ltree_plpython/.gitignore src/pl/plpython/.gitignore Finally, morally related, there is some Python 2/3 compat code in contrib/unaccent/generate_unaccent_rules.py that could be removed. Also, arguably, change the shebang line in that script.