Repository: cvxpy/cvxpy (language: cpp)

Issue:
ortools 9.10.4067 support missing
(CVXPY) Jun 13 11:17:04 AM: Encountered unexpected exception importing solver GLOP:
RuntimeError('Unrecognized new version of ortools (9.10.4067). Expected < 9.10.0. Please open a feature request on cvxpy to enable support for this version.')
(CVXPY) Jun 13 11:17:04 AM: Encountered unexpected exception importing solver PDLP:
RuntimeError('Unrecognized new version of ortools (9.10.4067). Expected < 9.10.0. Please open a feature request on cvxpy to enable support for this version.')



Discussion / hints:
Even worse: doing

`pip install --upgrade ortools`

makes cvxpy **_unusable_** (with the error message above), even if ortools is not going to be used!
@mlubin any thoughts?

Probably worth only erroring if people try to use ortools too
I can't test it right now, but I would guess that 9.10 will just work if you bump the bounds.

No objections to moving the version check to a less disruptive spot.

Fix patch:
diff --git a/continuous_integration/install_dependencies.sh b/continuous_integration/install_dependencies.sh
index dac7c915b7..58d81d2875 100644
--- a/continuous_integration/install_dependencies.sh
+++ b/continuous_integration/install_dependencies.sh
@@ -42,7 +42,7 @@ else
 fi
 
 if [[ "$PYTHON_VERSION" == "3.11" ]]; then
-  python -m pip install cplex "ortools>=9.7,<9.10"
+  python -m pip install cplex "ortools>=9.7,<9.12"
 fi
 
 if [[ "$RUNNER_OS" == "Windows" ]] && [[ "$PYTHON_VERSION" != "3.13" ]]; then
diff --git a/cvxpy/reductions/solvers/conic_solvers/glop_conif.py b/cvxpy/reductions/solvers/conic_solvers/glop_conif.py
index fb4abc14ad..646728b71b 100644
--- a/cvxpy/reductions/solvers/conic_solvers/glop_conif.py
+++ b/cvxpy/reductions/solvers/conic_solvers/glop_conif.py
@@ -51,9 +51,9 @@ def import_solver(self) -> None:
         if Version(ortools.__version__) < Version('9.5.0'):
             raise RuntimeError(f'Version of ortools ({ortools.__version__}) '
                                f'is too old. Expected >= 9.5.0.')
-        if Version(ortools.__version__) >= Version('9.10.0'):
+        if Version(ortools.__version__) >= Version('9.12.0'):
             raise RuntimeError('Unrecognized new version of ortools '
-                               f'({ortools.__version__}). Expected < 9.10.0. '
+                               f'({ortools.__version__}). Expected < 9.12.0. '
                                'Please open a feature request on cvxpy to '
                                'enable support for this version.')
 
diff --git a/cvxpy/reductions/solvers/conic_solvers/pdlp_conif.py b/cvxpy/reductions/solvers/conic_solvers/pdlp_conif.py
index bf3f5ec166..d5b0edff4f 100644
--- a/cvxpy/reductions/solvers/conic_solvers/pdlp_conif.py
+++ b/cvxpy/reductions/solvers/conic_solvers/pdlp_conif.py
@@ -51,9 +51,9 @@ def import_solver(self) -> None:
         if Version(ortools.__version__) < Version('9.7.0'):
             raise RuntimeError(f'Version of ortools ({ortools.__version__}) '
                                f'is too old. Expected >= 9.7.0.')
-        if Version(ortools.__version__) >= Version('9.10.0'):
+        if Version(ortools.__version__) >= Version('9.12.0'):
             raise RuntimeError('Unrecognized new version of ortools '
-                               f'({ortools.__version__}). Expected < 9.10.0. '
+                               f'({ortools.__version__}). Expected < 9.12.0. '
                                'Please open a feature request on cvxpy to '
                                'enable support for this version.')
 
diff --git a/pyproject.toml b/pyproject.toml
index d4833226ee..35a9f2807e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -65,14 +65,14 @@ CVXOPT = ["cvxopt"]
 DIFFCP = ["diffcp"]
 ECOS = ["ecos"]
 ECOS_BB = ["ecos"]
-GLOP = ["ortools>=9.7,<9.10"]
+GLOP = ["ortools>=9.7,<9.12"]
 GLPK = ["cvxopt"]
 GLPK_MI = ["cvxopt"]
 GUROBI = ["gurobipy"]
 HIGHS = ["highspy"]
 MOSEK = ["Mosek"]
 OSQP = []
-PDLP = ["ortools>=9.7,<9.10"]
+PDLP = ["ortools>=9.7,<9.12"]
 PIQP = ["piqp"]
 PROXQP = ["proxsuite"]
 SCIP = ["PySCIPOpt"]


Test patch: