litestar-org / polyfactory

Simple and powerful factories for mock data generation
https://polyfactory.litestar.dev/
MIT License
1.06k stars 83 forks source link

Enhancement: Deprecate collection params in FieldMeta.from_type #415

Closed adhtruong closed 1 year ago

adhtruong commented 1 year ago

Summary

After https://github.com/litestar-org/polyfactory/pull/407, these are no longer used other than passing onto child instances for https://github.com/litestar-org/polyfactory/blob/main/polyfactory/field_meta.py#L113 collection params.

Removing outright would be a breaking change so propose to

Basic Example

No response

Drawbacks and Impact

No response

Unresolved questions

No response


[!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

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.

Fund with Polar

guacs commented 1 year ago

Thanks for opening an issue to track this :)

I had it in my mind to implement the utils for deprecation (which we could just "borrow" from the litestar repo :P), but I forgot to create an issue for this.

adhtruong commented 1 year ago

Yep, taking from litestar repo sounds good for organisation level consistency.

Happy for me to start on this and make a PR?

guacs commented 1 year ago

Yep, taking from litestar repo sounds good for organisation level consistency.

Happy for me to start on this and make a PR?

Absolutely :)