From b25af4f8427361f5f803b4e0945d525088a5bcd9 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 9 May 2025 01:47:26 +0200 Subject: [PATCH] fix(c): don't use Cython 3.1 or following to build the extension The resulting module seems affected by a memory leak. https://github.com/cython/cython/issues/6850 --- psycopg_c/pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/psycopg_c/pyproject.toml b/psycopg_c/pyproject.toml index 905dfd0ed..cb332ec39 100644 --- a/psycopg_c/pyproject.toml +++ b/psycopg_c/pyproject.toml @@ -19,7 +19,12 @@ backend-path = ["build_backend"] [cython-backend] # These packages are only installed if there are pyx files to compile. -cython-requires = ["Cython >= 3.0.0"] + +# Don't install Cython 3.1: https://github.com/cython/cython/issues/6850 +# TODO: When the bug is solved we will remove the upper bound of the version +# and just exclude the known broken versions, or we will establish a new +# lower bound. +cython-requires = ["Cython >= 3.0.0, < 3.1.0"] [project] name = "psycopg-c" -- 2.47.2