From 4bf63b9faca00f280ccdd7e0362a086011d21441 Mon Sep 17 00:00:00 2001 From: Courtney Pacheco <6019922+courtneypacheco@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:05:06 -0500 Subject: [PATCH] Pin `docling-parse>=2.0.0,<3.0.0` + pin `pydantic==2.9.2` `docling-parse` v3.0.0 contains breaking changes to the syntax, which is currently breaking our builds. Also, `mypy` < v1.14 pulls in the latest version of `pydantic` by default, so this commimt hardcodes the correct span of `pydantic` versions that are compatible with `mypy` < v1.14 Finally, we want to pin `docling[tesserocr]>=2.4.2,<=2.8.3` due to breaking changes in v2.9.0 on 9 Dec 2024. Signed-off-by: Courtney Pacheco <6019922+courtneypacheco@users.noreply.github.com> --- requirements.txt | 3 ++- tox.ini | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7984751c..3d577c7a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 click>=8.1.7,<9.0.0 datasets>=2.18.0,<3.0.0 -docling[tesserocr]>=2.4.2,<3.0.0 +docling[tesserocr]>=2.4.2,<=2.8.3 +docling-parse>=2.0.0,<3.0.0 GitPython>=3.1.42,<4.0.0 gguf>=0.6.0 httpx>=0.25.0,<1.0.0 diff --git a/tox.ini b/tox.ini index 723212a9..7590a2ba 100644 --- a/tox.ini +++ b/tox.ini @@ -73,10 +73,13 @@ allowlist_externals = sh [testenv:mypy] description = Python type checking with mypy +# Note: 'mypy<1.14' by default pulls the latest 'pydantic' release as a dependency, but 'pydantic>=2.10' does not +# work with 'mypy<1.14', so for compatibility purposes, we set 'pydantic<=2.9.2' deps = - mypy>=1.10.0,<2.0 + mypy>=1.10.0,<1.14 types-PyYAML pytest + pydantic<=2.9.2 commands = mypy src