Skip to content

fix: pin pydantic to <2.12.5 due to string constraints parameter change#32

Open
ajuijas wants to merge 1 commit intodocling-project:mainfrom
ajuijas:fix/pydantic-string-constraints-issue-31
Open

fix: pin pydantic to <2.12.5 due to string constraints parameter change#32
ajuijas wants to merge 1 commit intodocling-project:mainfrom
ajuijas:fix/pydantic-string-constraints-issue-31

Conversation

@ajuijas
Copy link
Copy Markdown

@ajuijas ajuijas commented Mar 5, 2026

Fixes #31

Description:
This PR pins pydantic to <2.12.5 to resolve an import error with StringConstraints() that occurs when using newer versions of Pydantic with the currently stable docling-core.

The issue stems from a breaking change in Pydantic 2.12.5 where StringConstraints() no longer accepts positional arguments, which breaks docling_core/search/package.py. By capping the pydantic version, langchain-docling users will avoid this error until docling-core is bumped.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

DCO Check Passed

Thanks @ajuijas, all your commits are properly signed off. 🎉

@mergify
Copy link
Copy Markdown

mergify bot commented Mar 5, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Signed-off-by: ajuijas <ijas.ahmd.ap@gmail.com>
@ajuijas ajuijas force-pushed the fix/pydantic-string-constraints-issue-31 branch from e4bb2dd to 037c86b Compare March 5, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: langchain-docling Pydantic v2 Compatibility Issue

1 participant