Skip to content

chore!: declare pydantic>=2.11 as the minimum supported version - #13286

Merged
julian-risch merged 3 commits into
deepset-ai:mainfrom
hazelxue:fix/declare-tenacity-pydantic-floors
Oct 26, 2026
Merged

julian-risch merged 3 commits into
deepset-ai:mainfrom
hazelxue:fix/declare-tenacity-pydantic-floors

Conversation

@hazelxue

Copy link
Copy Markdown
Contributor

Related Issues

  • none filed; found while running the unit suite at the lowest versions the dependency list allows

Proposed Changes:

pydantic is listed without a lower bound. Resolving the project at the lowest allowed versions (Python 3.12, uv pip install --resolution lowest-direct) gives pydantic 2.5.0, and on every pydantic before 2.11 the JSON schemas that Tool / ComponentTool build for dataclass parameters come out differently from what the code and tests expect:

pydantic test/tools/test_parameters_schema_utils.py + test_component_tool.py
2.5.0 13 failed
2.7.4 13 failed
2.9.2 10 failed
2.10.6 10 failed
2.11.0 / 2.11.7 all pass

The differences are allOf wrappers around $ref when a description is attached and, on the older releases, missing required lists in $defs, so an environment that resolved to an old pydantic silently produced different tool schemas. This declares the floor the code already needs and adds a release note. No code change.

Rest of the unit suite at pydantic 2.11.0 (-m "not integration", Windows, no torch/jq installed): 6759 passed; the remaining failures are torch- and jq-dependent tests plus two Windows mime/notebook ones, unrelated to this change.

How did you test it?

  • Ran the two tool test files on pydantic 2.5.0, 2.7.4, 2.9.2, 2.10.6, 2.11.0 and 2.11.7 (table above).
  • Ran the full non-integration unit suite at pydantic 2.11.0.

Notes for the reviewer

If you would rather pin a different floor (e.g. the version your CI matrix actually installs), happy to adjust.

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes (n/a)
  • I added unit tests and updated the docstrings (no code change; existing tests cover it)
  • I've used one of the conventional commit types for my PR title: chore:
  • I documented my code (n/a)
  • I ran pre-commit hooks and fixed any issue (pyproject + release note only)
  • I added a release note under releasenotes/notes/

pydantic was unbounded. On 2.5 through 2.10 the JSON schemas that
Tool/ComponentTool generate for dataclass parameters differ from what
the code and tests expect (allOf wrappers around $ref, missing
required lists on older releases); test/tools/test_parameters_schema_utils.py
and test_component_tool.py only pass from 2.11 on.
@hazelxue
hazelxue requested a review from a team as a code owner October 16, 2026 06:10
@hazelxue
hazelxue requested review from julian-risch and removed request for a team October 16, 2026 06:10
@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@hazelxue is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Oct 16, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

pydantic 2.11 requires pydantic-core 2.33, which ships no cp314/cp315 wheels,
so the declared floor could not be installed on Python 3.14 and 3.15. 2.12 is
the first release with cp314 wheels and 2.14 the first with cp315 wheels.

Also file the release note under upgrade and name the APIs that build tool
parameter schemas.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@julian-risch

Copy link
Copy Markdown
Member

Thank you @hazelxue and congratulations on your first merged PR in haystack!

@julian-risch
julian-risch enabled auto-merge (squash) October 26, 2026 12:25
@julian-risch julian-risch changed the title chore: declare pydantic>=2.11 as the minimum supported version chore!: declare pydantic>=2.11 as the minimum supported version Oct 26, 2026
@HaystackBot

Copy link
Copy Markdown
Contributor

Hi @hazelxue, thanks a lot for your contribution! 🙏

We noticed that the Contributor License Agreement (CLA) check (license/cla) hasn't passed yet, so we've temporarily moved this PR to draft and paused the review assignment.

To get your PR reviewed, please sign the CLA via the link in the license/cla check below (or in the CLA bot comment). As soon as the check turns green, this PR will automatically be marked ready for review again and a reviewer will be re-assigned.

@HaystackBot HaystackBot added the cla-pending PR is in draft until the contributor signs the CLA label Oct 26, 2026
@HaystackBot
HaystackBot marked this pull request as draft October 26, 2026 12:34
auto-merge was automatically disabled October 26, 2026 12:34

Pull request was converted to draft

@HaystackBot
HaystackBot marked this pull request as ready for review October 26, 2026 13:03
@HaystackBot HaystackBot removed the cla-pending PR is in draft until the contributor signs the CLA label Oct 26, 2026
@HaystackBot

Copy link
Copy Markdown
Contributor

Thanks for signing the CLA, @hazelxue! 🎉 This PR is now ready for review again and the reviewer has been re-assigned.

@julian-risch
julian-risch merged commit e9aa112 into deepset-ai:main Oct 26, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants