Skip to content
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

Enhancement: Deprecate collection params in FieldMeta.from_type #415

Closed
adhtruong opened this issue Oct 19, 2023 · 3 comments · Fixed by #417
Closed

Enhancement: Deprecate collection params in FieldMeta.from_type #415

adhtruong opened this issue Oct 19, 2023 · 3 comments · Fixed by #417
Assignees
Labels
enhancement New feature or request

Comments

@adhtruong
Copy link
Collaborator

adhtruong commented Oct 19, 2023

Summary

After #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

  • Change defaults to None
  • Remove any internal usage
  • Omit deprecation warning if these are not None and that these will be removed in next major release. This may require adding some utils

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
@adhtruong adhtruong added the enhancement New feature or request label Oct 19, 2023
@guacs
Copy link
Member

guacs commented Oct 19, 2023

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
Copy link
Collaborator Author

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

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

@guacs
Copy link
Member

guacs commented Oct 19, 2023

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

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

Absolutely :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants