From f6170cafc765ff3bf0fc3770fe7415e8fbda0b5a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 11 Oct 2023 21:45:33 -0700 Subject: [PATCH 1/2] cylp/cy/CyCbcModel.pxd: Update exception specs for Cython 3 --- cylp/cy/CyCbcModel.pxd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cylp/cy/CyCbcModel.pxd b/cylp/cy/CyCbcModel.pxd index 5e43922a..f19a50bb 100644 --- a/cylp/cy/CyCbcModel.pxd +++ b/cylp/cy/CyCbcModel.pxd @@ -10,12 +10,12 @@ cdef extern from "CbcCompareUser.hpp": cdef cppclass CppCbcCompareUser "CbcCompareUser": pass ctypedef int (*runTest_t)(void* instance, CppICbcNode* x, - CppICbcNode* y) + CppICbcNode* y) except? -1 ctypedef bint (*runNewSolution_t)(void*instance, CppICbcModel* model, double objectiveAtContinuous, - int numberInfeasibilitiesAtContinuous) + int numberInfeasibilitiesAtContinuous) except? -1 ctypedef int (*runEvery1000Nodes_t)(void* instance, - CppICbcModel* model, int numberNodes) + CppICbcModel* model, int numberNodes) except? -1 bint equalityTest(CppICbcNode* x, CppICbcNode* y) From af10c2a9ae6189dc58eb46e866ac62f9d68d22aa Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 20 Oct 2023 12:04:16 -0700 Subject: [PATCH 2/2] pyproject.toml: Require Cython 3; pin to 3.0.4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6ed1892e..887b02b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ 'setuptools', 'wheel', - 'Cython < 3', + 'Cython == 3.0.4', # https://numpy.org/devdocs/user/depending_on_numpy.html#build-time-dependency # from https://github.com/scipy/oldest-supported-numpy/pull/78#issuecomment-1747936818: "oldest-supported-numpy; platform_python_implementation != 'PyPy'",