diff --git a/pyproject.toml b/pyproject.toml index 5afec4efa7..7326b4d6fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,9 +73,16 @@ chem = [ "scikit-fingerprints>=1.13.1", ] +# NOTE: There is an error in the metadata of onnxruntime version 1.24.1 to 1.24.3. +# The metadata claims that these versions are compatible with Python 3.10. +# However, Python 3.10 is not actually supported by versions >=1.24. +# As this causes issues with dependency resolving, we explicitly set the upper bound +# for onnxruntime to <1.24 for Python 3.10. +# See https://github.com/microsoft/onnxruntime/pull/27354 for more details. onnx = [ "onnx>=1.16.0", # see AUDIT NOTE, required by skl2onnx - "onnxruntime>=1.15.1", + "onnxruntime>=1.15.1,<1.24; python_version < '3.11'", + "onnxruntime>=1.15.1; python_version >= '3.11'", "skl2onnx>=1.19.1", ] diff --git a/uv.lock b/uv.lock index a14900db8e..59aadbaffc 100644 --- a/uv.lock +++ b/uv.lock @@ -427,7 +427,8 @@ requires-dist = [ { name = "ngboost", marker = "extra == 'extras'", specifier = ">=0.3.12,<1" }, { name = "numpy", specifier = ">=1.24.1,<3" }, { name = "onnx", marker = "extra == 'onnx'", specifier = ">=1.16.0" }, - { name = "onnxruntime", marker = "extra == 'onnx'", specifier = ">=1.15.1" }, + { name = "onnxruntime", marker = "python_full_version >= '3.11' and extra == 'onnx'", specifier = ">=1.15.1" }, + { name = "onnxruntime", marker = "python_full_version < '3.11' and extra == 'onnx'", specifier = ">=1.15.1,<1.24" }, { name = "openpyxl", marker = "extra == 'examples'", specifier = ">=3.0.9" }, { name = "pandas", specifier = ">=1.4.2,<3" }, { name = "pandas-stubs", marker = "extra == 'mypy'", specifier = ">=2.2.2.240603" },