From 7ef73acb94a72225e51f3c5c6b254b659fadca72 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Wed, 1 Jul 2026 11:50:35 +0530 Subject: [PATCH] CASSANDRA-20997: Skip Cython test matrix for Python 3.12+ in Jenkins pipeline --- .jenkins/Jenkinsfile | 1 + pylib/setup.py | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 293a143c97..e9198a4cdd 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -254,6 +254,7 @@ def tasks() { (isStageEnabled(axis['step'])) && // skip disabled steps !(axis['python'] != pythonDefault && 'cqlsh-test' != axis['step']) && // Use only python 3.8 for all tests but cqlsh-test !(axis['cython'] != 'no' && 'cqlsh-test' != axis['step']) && // cython only for cqlsh-test, disable for others + !(axis['cython'] == 'yes' && (axis['python'] == '3.12' || axis['python'] == '3.13')) && // Skip cython for Python 3.12+ !(axis['jdk'] != javaVersionDefault && ('cqlsh-test' == axis['step'] || 'simulator-dtest' == axis['step'] || axis['step'].contains('dtest-upgrade'))) && // run cqlsh-test, simulator-dtest, *dtest-upgrade only with jdk11 // Disable splits for all but proper stages !(axis['split'] > 1 && !stepsMap.findAll { entry -> entry.value.splits >= axis['split'] }.keySet().contains(axis['step'])) && diff --git a/pylib/setup.py b/pylib/setup.py index 6b3a773679..f5fd1841b3 100755 --- a/pylib/setup.py +++ b/pylib/setup.py @@ -20,15 +20,11 @@ from distutils.core import setup def get_extensions(): - # Cython < 3.0 is incompatible with Python 3.12+ C-API changes - if "--no-compile" in sys.argv or sys.version_info >= (3, 12): + if "--no-compile" in sys.argv: return [] - try: - from Cython.Build import cythonize - return cythonize("cqlshlib/copyutil.py") - except ImportError: - return [] + from Cython.Build import cythonize + return cythonize("cqlshlib/copyutil.py") setup( name="cassandra-pylib",