On 24.11.21 04:07, Tom Lane wrote:
According to [1], we need to stop including Python's <eval.h>.
I've not checked whether this creates any backwards-compatibility
issues.

                        regards, tom lane

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2023272

See attached patch. The minimum Python version for this change is 2.4, which is the oldest version supported by PG10, so we can backpatch this to all live branches.
From 069c0ee626aa7cabe3098feec97dd161f8c81376 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 10 Nov 2021 09:48:18 +0100
Subject: [PATCH] Remove unneeded Python includes

Inluding <compile.h> and <eval.h> has not been necessary since Python
2.4, since they are included via <Python.h>.  Morever, <eval.h> is
being removed in Python 3.11.  So remove these includes.
---
 src/pl/plpython/plpython.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/pl/plpython/plpython.h b/src/pl/plpython/plpython.h
index 994457b37d..ae1275afe2 100644
--- a/src/pl/plpython/plpython.h
+++ b/src/pl/plpython/plpython.h
@@ -94,9 +94,6 @@
 #undef TEXTDOMAIN
 #define TEXTDOMAIN PG_TEXTDOMAIN("plpython")
 
-#include <compile.h>
-#include <eval.h>
-
 /* put back our *printf macros ... this must match src/include/port.h */
 #ifdef vsnprintf
 #undef vsnprintf
-- 
2.33.1

Reply via email to