-
Notifications
You must be signed in to change notification settings - Fork 6
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 for Issue #16, Issue #6, plus some extra #18
base: main
Are you sure you want to change the base?
Conversation
when I went to create the PR I saw you fixed the I made the commits as targeted as possible so you can just cherrypick if you want. Successful test matrix at https://github.com/whiskeyriver/djantic2/actions/runs/12226405204 |
* Remove Python 3.8 (EOL) and add Python 3.13. * Add tox matrix for Pydantic 2.8 - 2.10 (<2.8 is uninstallible via poetry) * Update github actions/cache
* Always use `raise from` when reraising * Don't use mutable objects as kwarg defaults * Add missing assert to test case
Pydantic's json schema output changed after 2.8, eliminating the `allOf` wrapping of a single `$ref` element. See: pydantic/pydantic#10029 Here's a hacky way of ensuring tests run between these versions.
* Change `.dict()` to `.model_dump()` * Change `@validator` to `@field_validator` * Change the `Config` inner class to a `ConfigDict`
C405 Unnecessary `list` literal (rewrite as a `set` literal)
FactoryBoy is warning about not implicitly saving after post-generation. This quiets those warnings since these post-generation hooks use `create` explicitly.
Thank you. I see some useful stuff here, so I will cherry pick some of it in due time :) |
I went to fix this one line, and just saw some other stuff that might be a useful contribution so I added it.