-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
fix: pydantic ^2.9.0 needs 2 extra fields on to_argument #3632
Conversation
Reviewer's Guide by SourceryThis pull request addresses a bug related to the File-Level Changes
Tips
|
for more information, see https://pre-commit.ci
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.
Hey @chrisemke - I've reviewed your changes - here's some feedback:
Overall Comments:
- Good job on providing a focused fix for the Pydantic 2.9.0 compatibility issue. Consider adding tests to ensure this change works as expected and to prevent future regressions.
- It might be helpful to add a comment in the code explaining why these extra fields are needed specifically for Pydantic 2.9.0 and above.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
Hi, thanks for contributing to Strawberry 🍓! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of Release type: patch
Description of the changes, ideally with some examples, if adding a new feature. Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :) Here's the tweet text:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3632 +/- ##
=======================================
Coverage 96.76% 96.76%
=======================================
Files 522 522
Lines 33824 33824
Branches 5635 5635
=======================================
Hits 32731 32731
Misses 863 863
Partials 230 230 |
CodSpeed Performance ReportMerging #3632 will not alter performanceComparing Summary
|
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.
Looks good to me! Thanks :)
Can you add a release file too?
@chrisemke can you enable me to make commits here? I can try to fix the tests 😊 |
Thanks for contributing to Strawberry! 🎉 You've been invited to join You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67 And don't forget to join our discord server: https://strawberry.rocks/discord 🔥 |
Description
when using to_pydantic with pydantic 2.9.0 it causes a mypy crash. Simmilar to what happend in this case: #3436
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Fix a mypy crash by adding necessary fields to the to_pydantic method for compatibility with Pydantic 2.9.0.
Bug Fixes: