From 43e6b2556f239292acc72fcb6b6ceb1b69521e43 Mon Sep 17 00:00:00 2001 From: Lawrence Elitzer Date: Fri, 21 Nov 2025 09:13:34 -0600 Subject: [PATCH 1/6] chore(deps): Bump several depedencies to resolve open high CVEs --- requirements/base.in | 2 +- requirements/base.txt | 93 ++++++++++++----------- requirements/dev.txt | 170 +++++++++++++++++++++++------------------- requirements/test.txt | 88 +++++++++++++--------- 4 files changed, 193 insertions(+), 160 deletions(-) diff --git a/requirements/base.in b/requirements/base.in index 4ff4a201..026bf799 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -2,7 +2,7 @@ python-multipart huggingface-hub numpy -opencv-python!=4.7.0.68 +opencv-python>=4.12 onnx onnxruntime>=1.18.0 matplotlib diff --git a/requirements/base.txt b/requirements/base.txt index e422b4ae..02ee027e 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,16 +1,12 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile requirements/base.in -# -accelerate==1.7.0 +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/base.in -o requirements/base.txt +accelerate==1.12.0 # via -r requirements/base.in -certifi==2025.4.26 +certifi==2025.11.12 # via requests -cffi==1.17.1 +cffi==2.0.0 # via cryptography -charset-normalizer==3.4.2 +charset-normalizer==3.4.4 # via # pdfminer-six # requests @@ -18,24 +14,26 @@ coloredlogs==15.0.1 # via onnxruntime contourpy==1.3.2 # via matplotlib -cryptography==44.0.3 +cryptography==46.0.3 # via pdfminer-six cycler==0.12.1 # via matplotlib -filelock==3.18.0 +filelock==3.20.0 # via # huggingface-hub # torch # transformers -flatbuffers==25.2.10 +flatbuffers==25.9.23 # via onnxruntime -fonttools==4.58.0 +fonttools==4.60.1 # via matplotlib -fsspec==2025.3.2 +fsspec==2025.10.0 # via # huggingface-hub # torch -huggingface-hub==0.31.2 +hf-xet==1.2.0 + # via huggingface-hub +huggingface-hub==0.36.0 # via # -r requirements/base.in # accelerate @@ -44,26 +42,29 @@ huggingface-hub==0.31.2 # transformers humanfriendly==10.0 # via coloredlogs -idna==3.10 +idna==3.11 # via requests jinja2==3.1.6 # via torch -kiwisolver==1.4.8 +kiwisolver==1.4.9 # via matplotlib -markupsafe==3.0.2 +markupsafe==3.0.3 # via jinja2 -matplotlib==3.10.3 +matplotlib==3.10.7 # via -r requirements/base.in +ml-dtypes==0.5.4 + # via onnx mpmath==1.3.0 # via sympy networkx==3.4.2 # via torch -numpy==2.2.5 +numpy==2.2.6 # via # -r requirements/base.in # accelerate # contourpy # matplotlib + # ml-dtypes # onnx # onnxruntime # opencv-python @@ -71,11 +72,11 @@ numpy==2.2.5 # scipy # torchvision # transformers -onnx==1.18.0 +onnx==1.19.1 # via -r requirements/base.in -onnxruntime==1.22.0 +onnxruntime==1.23.2 # via -r requirements/base.in -opencv-python==4.11.0.86 +opencv-python==4.12.0.88 # via -r requirements/base.in packaging==25.0 # via @@ -84,25 +85,25 @@ packaging==25.0 # matplotlib # onnxruntime # transformers -pandas==2.2.3 +pandas==2.3.3 # via -r requirements/base.in -pdfminer-six==20250506 +pdfminer-six==20251107 # via -r requirements/base.in -pillow==11.2.1 +pillow==12.0.0 # via # matplotlib # torchvision -protobuf==6.31.0 +protobuf==6.33.1 # via # onnx # onnxruntime -psutil==7.0.0 +psutil==7.1.3 # via accelerate -pycparser==2.22 +pycparser==2.23 # via cffi -pyparsing==3.2.3 +pyparsing==3.2.5 # via matplotlib -pypdfium2==4.30.1 +pypdfium2==5.0.0 # via -r requirements/base.in python-dateutil==2.9.0.post0 # via @@ -112,21 +113,21 @@ python-multipart==0.0.20 # via -r requirements/base.in pytz==2025.2 # via pandas -pyyaml==6.0.2 +pyyaml==6.0.3 # via # accelerate # huggingface-hub # timm # transformers -rapidfuzz==3.13.0 +rapidfuzz==3.14.3 # via -r requirements/base.in -regex==2024.11.6 +regex==2025.11.3 # via transformers -requests==2.32.3 +requests==2.32.5 # via # huggingface-hub # transformers -safetensors==0.5.3 +safetensors==0.7.0 # via # accelerate # timm @@ -139,33 +140,31 @@ sympy==1.14.0 # via # onnxruntime # torch -timm==1.0.15 +timm==1.0.22 # via -r requirements/base.in -tokenizers==0.21.1 +tokenizers==0.22.1 # via transformers -torch==2.7.0 +torch==2.9.1 # via # -r requirements/base.in # accelerate # timm # torchvision -torchvision==0.22.0 +torchvision==0.24.1 # via timm tqdm==4.67.1 # via # huggingface-hub # transformers -transformers==4.51.3 +transformers==4.57.1 # via -r requirements/base.in -typing-extensions==4.13.2 +typing-extensions==4.15.0 # via + # cryptography # huggingface-hub # onnx # torch tzdata==2025.2 # via pandas -urllib3==2.4.0 +urllib3==2.5.0 # via requests - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/dev.txt b/requirements/dev.txt index cdd791da..ff2f1180 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,59 +1,55 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile requirements/dev.in -# -anyio==4.9.0 +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/dev.in -o requirements/dev.txt +anyio==4.11.0 # via # -c requirements/test.txt # httpx # jupyter-server appnope==0.1.4 # via ipykernel -argon2-cffi==23.1.0 +argon2-cffi==25.1.0 # via jupyter-server -argon2-cffi-bindings==21.2.0 +argon2-cffi-bindings==25.1.0 # via argon2-cffi -arrow==1.3.0 +arrow==1.4.0 # via isoduration -asttokens==3.0.0 +asttokens==3.0.1 # via stack-data async-lru==2.0.5 # via jupyterlab -attrs==25.3.0 +attrs==25.4.0 # via # jsonschema # referencing babel==2.17.0 # via jupyterlab-server -beautifulsoup4==4.13.4 +beautifulsoup4==4.14.2 # via nbconvert -bleach[css]==6.2.0 +bleach==6.3.0 # via nbconvert -build==1.2.2.post1 +build==1.3.0 # via pip-tools -certifi==2025.4.26 +certifi==2025.11.12 # via # -c requirements/base.txt # -c requirements/test.txt # httpcore # httpx # requests -cffi==1.17.1 +cffi==2.0.0 # via # -c requirements/base.txt # argon2-cffi-bindings -charset-normalizer==3.4.2 +charset-normalizer==3.4.4 # via # -c requirements/base.txt # -c requirements/test.txt # requests -click==8.2.0 +click==8.3.1 # via # -c requirements/test.txt # pip-tools -comm==0.2.2 +comm==0.2.3 # via # ipykernel # ipywidgets @@ -65,17 +61,21 @@ cycler==0.12.1 # via # -c requirements/base.txt # matplotlib -debugpy==1.8.14 +debugpy==1.8.17 # via ipykernel decorator==5.2.1 # via ipython defusedxml==0.7.1 # via nbconvert -executing==2.2.0 +exceptiongroup==1.3.0 + # via + # anyio + # ipython +executing==2.2.1 # via stack-data -fastjsonschema==2.21.1 +fastjsonschema==2.21.2 # via nbformat -fonttools==4.58.0 +fonttools==4.60.1 # via # -c requirements/base.txt # matplotlib @@ -93,7 +93,7 @@ httpx==0.28.1 # via # -c requirements/test.txt # jupyterlab -idna==3.10 +idna==3.11 # via # -c requirements/base.txt # -c requirements/test.txt @@ -101,20 +101,18 @@ idna==3.10 # httpx # jsonschema # requests -ipykernel==6.29.5 +ipykernel==7.1.0 # via # jupyter # jupyter-console # jupyterlab -ipython==9.2.0 +ipython==8.37.0 # via # -r requirements/dev.in # ipykernel # ipywidgets # jupyter-console -ipython-pygments-lexers==1.1.1 - # via ipython -ipywidgets==8.1.7 +ipywidgets==8.1.8 # via jupyter isoduration==20.11.0 # via jsonschema @@ -127,16 +125,16 @@ jinja2==3.1.6 # jupyterlab # jupyterlab-server # nbconvert -json5==0.12.0 +json5==0.12.1 # via jupyterlab-server jsonpointer==3.0.0 # via jsonschema -jsonschema[format-nongpl]==4.23.0 +jsonschema==4.25.1 # via # jupyter-events # jupyterlab-server # nbformat -jsonschema-specifications==2025.4.1 +jsonschema-specifications==2025.9.1 # via jsonschema jupyter==1.1.1 # via -r requirements/dev.in @@ -148,7 +146,7 @@ jupyter-client==8.6.3 # nbclient jupyter-console==6.6.3 # via jupyter -jupyter-core==5.7.2 +jupyter-core==5.9.1 # via # ipykernel # jupyter-client @@ -160,9 +158,9 @@ jupyter-core==5.7.2 # nbformat jupyter-events==0.12.0 # via jupyter-server -jupyter-lsp==2.2.5 +jupyter-lsp==2.3.0 # via jupyterlab -jupyter-server==2.16.0 +jupyter-server==2.17.0 # via # jupyter-lsp # jupyterlab @@ -171,36 +169,38 @@ jupyter-server==2.16.0 # notebook-shim jupyter-server-terminals==0.5.3 # via jupyter-server -jupyterlab==4.4.2 +jupyterlab==4.5.0 # via # jupyter # notebook jupyterlab-pygments==0.3.0 # via nbconvert -jupyterlab-server==2.27.3 +jupyterlab-server==2.28.0 # via # jupyterlab # notebook -jupyterlab-widgets==3.0.15 +jupyterlab-widgets==3.0.16 # via ipywidgets -kiwisolver==1.4.8 +kiwisolver==1.4.9 # via # -c requirements/base.txt # matplotlib -markupsafe==3.0.2 +lark==1.3.1 + # via rfc3987-syntax +markupsafe==3.0.3 # via # -c requirements/base.txt # jinja2 # nbconvert -matplotlib==3.10.3 +matplotlib==3.10.7 # via # -c requirements/base.txt # -r requirements/dev.in -matplotlib-inline==0.1.7 +matplotlib-inline==0.2.1 # via # ipykernel # ipython -mistune==3.1.3 +mistune==3.1.4 # via nbconvert nbclient==0.10.2 # via nbconvert @@ -215,13 +215,13 @@ nbformat==5.10.4 # nbconvert nest-asyncio==1.6.0 # via ipykernel -notebook==7.4.2 +notebook==7.5.0 # via jupyter notebook-shim==0.2.4 # via # jupyterlab # notebook -numpy==2.2.5 +numpy==2.2.6 # via # -c requirements/base.txt # contourpy @@ -242,28 +242,30 @@ packaging==25.0 # nbconvert pandocfilters==1.5.1 # via nbconvert -parso==0.8.4 +parso==0.8.5 # via jedi pexpect==4.9.0 # via ipython -pillow==11.2.1 +pillow==12.0.0 # via # -c requirements/base.txt # -c requirements/test.txt # matplotlib -pip-tools==7.4.1 +pip==25.3 + # via pip-tools +pip-tools==7.5.2 # via -r requirements/dev.in -platformdirs==4.3.8 +platformdirs==4.5.0 # via # -c requirements/test.txt # jupyter-core -prometheus-client==0.21.1 +prometheus-client==0.23.1 # via jupyter-server -prompt-toolkit==3.0.51 +prompt-toolkit==3.0.52 # via # ipython # jupyter-console -psutil==7.0.0 +psutil==7.1.3 # via # -c requirements/base.txt # ipykernel @@ -273,17 +275,17 @@ ptyprocess==0.7.0 # terminado pure-eval==0.2.3 # via stack-data -pycparser==2.22 +pycparser==2.23 # via # -c requirements/base.txt # cffi -pygments==2.19.1 +pygments==2.19.2 # via + # -c requirements/test.txt # ipython - # ipython-pygments-lexers # jupyter-console # nbconvert -pyparsing==3.2.3 +pyparsing==3.2.5 # via # -c requirements/base.txt # matplotlib @@ -297,25 +299,25 @@ python-dateutil==2.9.0.post0 # arrow # jupyter-client # matplotlib -python-json-logger==3.3.0 +python-json-logger==4.0.0 # via jupyter-events -pyyaml==6.0.2 +pyyaml==6.0.3 # via # -c requirements/base.txt # -c requirements/test.txt # jupyter-events -pyzmq==26.4.0 +pyzmq==27.1.0 # via # ipykernel # jupyter-client # jupyter-console # jupyter-server -referencing==0.36.2 +referencing==0.37.0 # via # jsonschema # jsonschema-specifications # jupyter-events -requests==2.32.3 +requests==2.32.5 # via # -c requirements/base.txt # -c requirements/test.txt @@ -328,12 +330,18 @@ rfc3986-validator==0.1.1 # via # jsonschema # jupyter-events -rpds-py==0.25.0 +rfc3987-syntax==1.1.0 + # via jsonschema +rpds-py==0.29.0 # via # jsonschema # referencing send2trash==1.8.3 # via jupyter-server +setuptools==80.9.0 + # via + # jupyterlab + # pip-tools six==1.17.0 # via # -c requirements/base.txt @@ -343,7 +351,7 @@ sniffio==1.3.1 # via # -c requirements/test.txt # anyio -soupsieve==2.7 +soupsieve==2.8 # via beautifulsoup4 stack-data==0.6.3 # via ipython @@ -353,7 +361,12 @@ terminado==0.18.1 # jupyter-server-terminals tinycss2==1.4.0 # via bleach -tornado==6.5 +tomli==2.3.0 + # via + # build + # jupyterlab + # pip-tools +tornado==6.5.2 # via # ipykernel # jupyter-client @@ -363,7 +376,6 @@ tornado==6.5 # terminado traitlets==5.14.3 # via - # comm # ipykernel # ipython # ipywidgets @@ -377,37 +389,39 @@ traitlets==5.14.3 # nbclient # nbconvert # nbformat -types-python-dateutil==2.9.0.20241206 - # via arrow -typing-extensions==4.13.2 +typing-extensions==4.15.0 # via # -c requirements/base.txt # -c requirements/test.txt # anyio + # async-lru # beautifulsoup4 + # exceptiongroup + # ipython + # mistune # referencing +tzdata==2025.2 + # via + # -c requirements/base.txt + # arrow uri-template==1.3.0 # via jsonschema -urllib3==2.4.0 +urllib3==2.5.0 # via # -c requirements/base.txt # -c requirements/test.txt # requests -wcwidth==0.2.13 +wcwidth==0.2.14 # via prompt-toolkit -webcolors==24.11.1 +webcolors==25.10.0 # via jsonschema webencodings==0.5.1 # via # bleach # tinycss2 -websocket-client==1.8.0 +websocket-client==1.9.0 # via jupyter-server wheel==0.45.1 # via pip-tools -widgetsnbextension==4.0.14 +widgetsnbextension==4.0.15 # via ipywidgets - -# The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools diff --git a/requirements/test.txt b/requirements/test.txt index 1c474408..067cfbca 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,66 +1,70 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile requirements/test.in -# -anyio==4.9.0 +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/test.in -o requirements/test.txt +anyio==4.11.0 # via httpx -black==25.1.0 +black==25.11.0 # via -r requirements/test.in -certifi==2025.4.26 +certifi==2025.11.12 # via # -c requirements/base.txt # httpcore # httpx # requests -charset-normalizer==3.4.2 +charset-normalizer==3.4.4 # via # -c requirements/base.txt # requests -click==8.2.0 +click==8.3.1 # via # -r requirements/test.in # black -coverage[toml]==7.8.0 +coverage==7.12.0 # via # -r requirements/test.in # pytest-cov -filelock==3.18.0 +exceptiongroup==1.3.0 + # via + # anyio + # pytest +filelock==3.20.0 # via # -c requirements/base.txt # huggingface-hub -flake8==7.2.0 +flake8==7.3.0 # via # -r requirements/test.in # flake8-docstrings flake8-docstrings==1.7.0 # via -r requirements/test.in -fsspec==2025.3.2 +fsspec==2025.10.0 # via # -c requirements/base.txt # huggingface-hub h11==0.16.0 # via httpcore +hf-xet==1.2.0 + # via + # -c requirements/base.txt + # huggingface-hub httpcore==1.0.9 # via httpx httpx==0.28.1 # via -r requirements/test.in -huggingface-hub==0.31.2 +huggingface-hub==0.36.0 # via # -c requirements/base.txt # -r requirements/test.in -idna==3.10 +idna==3.11 # via # -c requirements/base.txt # anyio # httpx # requests -iniconfig==2.1.0 +iniconfig==2.3.0 # via pytest mccabe==0.7.0 # via flake8 -mypy==1.15.0 +mypy==1.18.2 # via -r requirements/test.in mypy-extensions==1.1.0 # via @@ -73,58 +77,74 @@ packaging==25.0 # huggingface-hub # pytest pathspec==0.12.1 - # via black + # via + # black + # mypy pdf2image==1.17.0 # via -r requirements/test.in -pillow==11.2.1 +pillow==12.0.0 # via # -c requirements/base.txt # pdf2image -platformdirs==4.3.8 +platformdirs==4.5.0 # via black pluggy==1.6.0 - # via pytest -pycodestyle==2.13.0 + # via + # pytest + # pytest-cov +pycodestyle==2.14.0 # via flake8 pydocstyle==6.3.0 # via flake8-docstrings -pyflakes==3.3.2 +pyflakes==3.4.0 # via flake8 -pytest==8.3.5 +pygments==2.19.2 + # via pytest +pytest==9.0.1 # via # pytest-cov # pytest-mock -pytest-cov==6.1.1 +pytest-cov==7.0.0 # via -r requirements/test.in -pytest-mock==3.14.0 +pytest-mock==3.15.1 # via -r requirements/test.in -pyyaml==6.0.2 +pytokens==0.3.0 + # via black +pyyaml==6.0.3 # via # -c requirements/base.txt # huggingface-hub -requests==2.32.3 +requests==2.32.5 # via # -c requirements/base.txt # huggingface-hub -ruff==0.11.10 +ruff==0.14.6 # via -r requirements/test.in sniffio==1.3.1 # via anyio snowballstemmer==3.0.1 # via pydocstyle +tomli==2.3.0 + # via + # black + # coverage + # mypy + # pytest tqdm==4.67.1 # via # -c requirements/base.txt # huggingface-hub -types-pyyaml==6.0.12.20250402 +types-pyyaml==6.0.12.20250915 # via -r requirements/test.in -typing-extensions==4.13.2 +typing-extensions==4.15.0 # via # -c requirements/base.txt # anyio + # black + # exceptiongroup # huggingface-hub # mypy -urllib3==2.4.0 +urllib3==2.5.0 # via # -c requirements/base.txt # requests From 03115f6162499f99fc08b432098c25121cc7fd1d Mon Sep 17 00:00:00 2001 From: Lawrence Elitzer Date: Fri, 21 Nov 2025 09:21:37 -0600 Subject: [PATCH 2/6] fix: xclude pip and setuptools pinning based on cursor comment --- requirements/base.txt | 2 +- requirements/dev.txt | 14 +++++++------- requirements/test.txt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 02ee027e..b215b046 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile requirements/base.in -o requirements/base.txt +# uv pip compile requirements/base.in -o requirements/base.txt --no-emit-package pip --no-emit-package setuptools accelerate==1.12.0 # via -r requirements/base.in certifi==2025.11.12 diff --git a/requirements/dev.txt b/requirements/dev.txt index ff2f1180..b2f6e0f9 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile requirements/dev.in -o requirements/dev.txt +# uv pip compile requirements/dev.in -o requirements/dev.txt --no-emit-package pip --no-emit-package setuptools anyio==4.11.0 # via # -c requirements/test.txt @@ -69,6 +69,7 @@ defusedxml==0.7.1 # via nbconvert exceptiongroup==1.3.0 # via + # -c requirements/test.txt # anyio # ipython executing==2.2.1 @@ -251,8 +252,6 @@ pillow==12.0.0 # -c requirements/base.txt # -c requirements/test.txt # matplotlib -pip==25.3 - # via pip-tools pip-tools==7.5.2 # via -r requirements/dev.in platformdirs==4.5.0 @@ -338,10 +337,6 @@ rpds-py==0.29.0 # referencing send2trash==1.8.3 # via jupyter-server -setuptools==80.9.0 - # via - # jupyterlab - # pip-tools six==1.17.0 # via # -c requirements/base.txt @@ -363,6 +358,7 @@ tinycss2==1.4.0 # via bleach tomli==2.3.0 # via + # -c requirements/test.txt # build # jupyterlab # pip-tools @@ -425,3 +421,7 @@ wheel==0.45.1 # via pip-tools widgetsnbextension==4.0.15 # via ipywidgets + +# The following packages were excluded from the output: +# pip +# setuptools diff --git a/requirements/test.txt b/requirements/test.txt index 067cfbca..e24836af 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile requirements/test.in -o requirements/test.txt +# uv pip compile requirements/test.in -o requirements/test.txt --no-emit-package pip --no-emit-package setuptools anyio==4.11.0 # via httpx black==25.11.0 From 0571a44aacf9632ec9999526b94a0f5c16a41c03 Mon Sep 17 00:00:00 2001 From: Lawrence Elitzer Date: Fri, 21 Nov 2025 09:27:33 -0600 Subject: [PATCH 3/6] fix: With the newer version of transformers 4.57.1, the type checking became stricter, and mypy correctly flagged that DetrImageProcessor.from_pretrained() expects str | PathLike[Any], not a model object. --- unstructured_inference/models/tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unstructured_inference/models/tables.py b/unstructured_inference/models/tables.py index 52248605..3dc3ec1d 100644 --- a/unstructured_inference/models/tables.py +++ b/unstructured_inference/models/tables.py @@ -67,7 +67,7 @@ def predict( def initialize( self, - model: Union[str, Path, TableTransformerForObjectDetection], + model: Union[str, Path], device: Optional[str] = "cuda" if torch.cuda.is_available() else "cpu", ): """Loads the donut model using the specified parameters""" From 1241f1bd1715b033a37ea08a855cfcdc707a086b Mon Sep 17 00:00:00 2001 From: Lawrence Elitzer Date: Fri, 21 Nov 2025 09:31:31 -0600 Subject: [PATCH 4/6] Bump CHANGELOG and version --- CHANGELOG.md | 6 ++++++ unstructured_inference/__version__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21fb2e5e..3651d344 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.1.2 + +* chore(deps): Bump several depedencies to resolve open high CVEs +* fix: Exclude pip and setuptools pinning based on cursor comment +* fix: With the newer version of transformers 4.57.1, the type checking became stricter, and mypy correctly flagged that DetrImageProcessor.from_pretrained() expects str | PathLike[Any], not a model object. + ## 1.1.1 * Add NotImplementedError when trying to single index a TextRegions, reflecting the fact that it won't behave correctly at the moment. diff --git a/unstructured_inference/__version__.py b/unstructured_inference/__version__.py index bedefe47..502bb1b2 100644 --- a/unstructured_inference/__version__.py +++ b/unstructured_inference/__version__.py @@ -1 +1 @@ -__version__ = "1.1.1" # pragma: no cover +__version__ = "1.1.2" # pragma: no cover From 064389570e608ed38eca83e8d045b846843cab48 Mon Sep 17 00:00:00 2001 From: Lawrence Elitzer Date: Fri, 21 Nov 2025 09:37:16 -0600 Subject: [PATCH 5/6] fix: Update test to explicitly cast numpy array to uint8 for Pillow 12.0.0 compatibility --- CHANGELOG.md | 1 + test_unstructured_inference/inference/test_layout.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3651d344..06cdbc53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * chore(deps): Bump several depedencies to resolve open high CVEs * fix: Exclude pip and setuptools pinning based on cursor comment * fix: With the newer version of transformers 4.57.1, the type checking became stricter, and mypy correctly flagged that DetrImageProcessor.from_pretrained() expects str | PathLike[Any], not a model object. +* fix: Update test to explicitly cast numpy array to uint8 for Pillow 12.0.0 compatibility ## 1.1.1 diff --git a/test_unstructured_inference/inference/test_layout.py b/test_unstructured_inference/inference/test_layout.py index b7756de2..518d12eb 100644 --- a/test_unstructured_inference/inference/test_layout.py +++ b/test_unstructured_inference/inference/test_layout.py @@ -109,7 +109,7 @@ def deduplicate_detected_elements(self, elements, *args, **kwargs): def test_get_page_elements(monkeypatch, mock_final_layout): - image = Image.fromarray(np.random.randint(12, 14, size=(40, 10, 3)), mode="RGB") + image = Image.fromarray(np.random.randint(12, 14, size=(40, 10, 3)).astype(np.uint8), mode="RGB") page = layout.PageLayout( number=0, image=image, From a9548abfa8cd93bc990b1427a77b5a57b1ea1569 Mon Sep 17 00:00:00 2001 From: Lawrence Elitzer Date: Fri, 21 Nov 2025 09:40:52 -0600 Subject: [PATCH 6/6] fix: run line length linter/formatter --- test_unstructured_inference/inference/test_layout.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_unstructured_inference/inference/test_layout.py b/test_unstructured_inference/inference/test_layout.py index 518d12eb..58dfe63a 100644 --- a/test_unstructured_inference/inference/test_layout.py +++ b/test_unstructured_inference/inference/test_layout.py @@ -109,7 +109,9 @@ def deduplicate_detected_elements(self, elements, *args, **kwargs): def test_get_page_elements(monkeypatch, mock_final_layout): - image = Image.fromarray(np.random.randint(12, 14, size=(40, 10, 3)).astype(np.uint8), mode="RGB") + image = Image.fromarray( + np.random.randint(12, 14, size=(40, 10, 3)).astype(np.uint8), mode="RGB" + ) page = layout.PageLayout( number=0, image=image,