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

πŸ—‘οΈ Deprecate support for is_flag and flag_value parameters #987

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

svlandeg
Copy link
Member

@svlandeg svlandeg commented Sep 13, 2024

Fixes #986

  • Raise a DeprecationWarning when OptionInfo receives a value for is_flag and/or flag_value
  • TyperOption doesn't use flag_value anymore and its is_flag is now defined only by looking at whether or not main_type is bool

These parameters weren't actually functional (cf. #873) and they weren't documented, so I don't think this should be breaking. But it's always difficult to say - users could be relying on unspecified internals... 🫀

@svlandeg svlandeg self-assigned this Sep 13, 2024
@svlandeg svlandeg marked this pull request as draft September 13, 2024 13:35
@svlandeg svlandeg changed the title πŸ”₯ Deprecate support for is_flag and flag_value parameters πŸ—‘οΈ Deprecate support for is_flag and flag_value parameters Sep 13, 2024
@svlandeg svlandeg marked this pull request as ready for review September 13, 2024 14:06
@svlandeg svlandeg removed their assignment Sep 13, 2024
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Looks good! πŸš€ Thank you! πŸ™‡

@tiangolo tiangolo merged commit abd9b45 into fastapi:master Nov 7, 2024
23 checks passed
@svlandeg svlandeg deleted the feat/depr_flag branch November 8, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate support for is_flag and flag_value parameters
2 participants