From 79cd86f6642c9cfef6efd33b766580dcd7f19c38 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Thu, 2 Jul 2026 10:52:12 +0530 Subject: [PATCH] CASSANDRA-20997: Add assertion for Python 3.12+ Cython incompatibility in setup.py --- pylib/setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pylib/setup.py b/pylib/setup.py index f5fd1841b3..4e7737e634 100755 --- a/pylib/setup.py +++ b/pylib/setup.py @@ -23,6 +23,8 @@ def get_extensions(): if "--no-compile" in sys.argv: return [] + assert sys.version_info < (3, 12), "Cython < 3.0 is incompatible with Python 3.12+ C-API changes. See CASSANDRA-21482." + from Cython.Build import cythonize return cythonize("cqlshlib/copyutil.py")