You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Leobouloc thanks! It's both a bug and not a bug at the same time 😄 This was included to handle parsing of constraints for pydantic v1, but the logic for v1 of pydantic doesn't use the FieldMeta.parse_constraints method due to it needing some specialized logic in how they're handled. Hence, no one's had any validation issues so far.
If you're willing, feel free to raise a PR to fix it :)
I would be glad to contribute, but am afraid I don't really understand the inner workings of the package ?
That's completely fine! You can still give it a go and if you need any help, feel free to ask here or in discord.
Concerning your answer, are you saying that max_length should be max_items or are you suggesting larger changes ?
I think we can just remove that check for max_items and min_items from there. It's only for v1 and since we're not using parse_constraints for v1, there's no reason to keep them there.
EDIT: Also, there are larger changes with respect to how v1 is handled that are planned which is being tracked in #435. I haven't been able to really get it to work yet because of how the API of pydantic v1 works.
Description
By analogy, I assume the line:
should be:
(if it is not a typo, the second
getattr
is redundant and could be removed)polyfactory/polyfactory/field_meta.py
Lines 211 to 212 in b479e4a
URL to code causing the issue
polyfactory/polyfactory/field_meta.py
Line 211 in b479e4a
MCVE
No response
Steps to reproduce
No response
Screenshots
No response
Logs
No response
Release Version
2.12.0
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh Litestar dashboard
The text was updated successfully, but these errors were encountered: