-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Update MCP to use Pydantic>=2.11 #1041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MCP to use Pydantic>=2.11 #1041
Conversation
@bhosmer-ant Would you like to review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can update the lockfile and the tests, but we can't update the pyproject.toml
.
3ada8ab
to
186f821
Compare
@Kludex Is everything good now? |
@Kludex I think it can be merged now |
@Kludex @medaminezghal unfortunately the changes here are incompatible with the older versions of pydantic we still want to support (due to pydantic-core changes from 2.27 to 2.33). I'll try to forward fix but may need to revert |
You need to check the comments in this PR. This PR doesn't bump the minimum version of pydantic. It bumps on this project pipeline only. |
Yup I'd read the comments. The problem is that we're not bumping the minimum version - it means that we're allowing older versions of pydantic with which the fixes here are incompatible. (The issue isn't with pydantic itself but with pydantic-core: the new version of pydantic pins a version of pydantic-core which has the changes that necessitated these changes.)
Can you elaborate? Are there concrete instances you're aware of, or was it just on general principles? |
@bhosmer-ant This change will only affect how tests work with I don't think it will cause any problem with other packages. |
@medaminezghal the problem is when Pydantic < 2.11 is installed (as allowed by pyproject.toml). Earlier versions pin an earlier version of The root of the problem is |
I don't understand the problem here. If this repository wants to the right thing, it needs to test the lowest and the latest version allowed. The pydantic version on the lockfile was already far above the minimum before this PR. Python package repositories usually make sure the latest release are tested without breaking the previous versions - or test lowest and latest. About my comment on the "other maintainers" I meant that people may be pinning pydantic for some reason, and it forces them to work and update the project, which is annoying. |
Update tests to be compatible with
pydantic>=2.11