Skip to content

Conversation

@medaminezghal
Copy link
Contributor

This is a fix for this issue.

@medaminezghal
Copy link
Contributor Author

@dsp-ant This is a fix to make the sdk compatible with Pydantic 2.11 otherwise the tests will fail.

@medaminezghal
Copy link
Contributor Author

@ihrpr @Kludex @dsp-ant would you review this pull request?
It’s needed to fix this error: Error executing tool add: Accessing the 'model_fields' attribute on the instance is deprecated. Instead, you should access this attribute from the model class. Deprecated in Pydantic V2.11 to be removed in V3.0.

you can try to check if it exist using Pydantic 2.11. You won’t get this error if you’re using Pydantic 2.10.

@medaminezghal
Copy link
Contributor Author

@Kludex
Copy link
Member

Kludex commented Apr 11, 2025

Happy to review if you remove all the formatting from this PR.

@medaminezghal
Copy link
Contributor Author

@Kludex I’ve just followed the contribution guide. So I think the formatting is part of the guide.

@Kludex
Copy link
Member

Kludex commented Apr 11, 2025

There was a mismatch on ruff version between CI and the pre-commit. I fixed it yesterday.

There are many changes in this PR that are formatting.

I mean, it's our fault, but I'd appreciate if those unrelated changes are stripped from this PR. 🙏

@medaminezghal
Copy link
Contributor Author

I mean, it's our fault, but I'd appreciate if those unrelated changes are stripped from this PR. 🙏

I've fixed the formatting issue now. Could you review it?

@Kludex Kludex merged commit 70115b9 into modelcontextprotocol:main Apr 11, 2025
6 checks passed
@medaminezghal medaminezghal deleted the pydantic2.11-support branch April 11, 2025 07:18
gspencergoog pushed a commit to gspencergoog/mcp-python-sdk that referenced this pull request Jul 29, 2025
… quickstart (modelcontextprotocol#465)

Update client.mdx to reflect breaking change replacing the  `.defaultTools()` by `.defaultToolCallbacks()` for registering MCP tools.

Signed-off-by: Christian Tzolov <[email protected]>
saqadri pushed a commit to saqadri/stdio-fixes that referenced this pull request Aug 6, 2025
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.

2 participants