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
This summarises the work still needing to be done for 8.2.0, particularly on the PRs and issues attached to the milestone. The summary is based on the comments and additionally some of my own thoughts. This is an attempt to make the 8.2.0 changes easier to review as there has been a lack of time by contributors. This was following a brief discussion on Discord where I asked what can be done to help contribute even though there is a lack of time by the contributors themselves:
Coming up with a list of “here’s bug fixes PRs that work, merge the and make a fix release” could be helpful as well
It's ignoring a type error that might be preventable if param.param_type_name == "option" were to be replaced with isinstance(param, Option). However, that will introduce a circular dependency. I'm not sure it's something that's easily fixable right now.
The current implementation checks every single time an option is used, whether its name has been used before. I feel like we can move this check elsewhere so it only does this check once per command. If you want to be technical about it, it should make the check O(n) instead of O(n^2) where n is the number of options.
Move duplicate option declaration check so it only runs once per command instead of once per option.
Document that a UserWarning will be logged if an "option" declaration is reused.
Nit: the warnings import should be moved to the module level.
Perhaps the ctx.call_on_close documentation should mention the change in behaviour as well? Though I would say it's assumed that an exit actually would call this too and it's not needed.
Before this PR ProgressBar.is_hidden existed. This adds ProgressBar.hidden which is the value of the new passed constructor field hidden. This was mentioned in the comments as well but then the author faced issues getting it to work in tests. I'm sure we can get this to work however, if not, then we can at least document why it's there.
Merge ProgressBar._is_hidden and ProgressBar.hidden into ProgressBar.is_hidden.
Potentially Included
These are primarily added in this separate section as I classified them as 8.2.0 though haven't necessarily been "agreed upon" by others (yet).
This summarises the work still needing to be done for 8.2.0, particularly on the PRs and issues attached to the milestone. The summary is based on the comments and additionally some of my own thoughts. This is an attempt to make the
8.2.0
changes easier to review as there has been a lack of time by contributors. This was following a brief discussion on Discord where I asked what can be done to help contribute even though there is a lack of time by the contributors themselves:Pull Requests & Issues
EnumChoice
parameter type #2210EnumChoice
Choice
token normalization + removestr
requirement #2796deprecated
toOption
.deprecated
toParameter
so it is not available to@click.argument
.Command(deprecated: bool)
implementation.deprecated
toParameter
so bothOption
andArgument
support it.param.param_type_name == "option"
were to be replaced withisinstance(param, Option)
. However, that will introduce a circular dependency. I'm not sure it's something that's easily fixable right now.UserWarning
will be logged if an "option" declaration is reused.Nit: the warnings import should be moved to the module level.DocumentLet's not make it entirely public for now.Option.get_help_extra
get_help_extra
to add typing instead of relying on untyped dict.<stderr>
and<stdout>
mix inCliRunner
results #2523ctx.call_on_close
documentation should mention the change in behaviour as well? Though I would say it's assumed that an exit actually would call this too and it's not needed.ProgressBar.is_hidden
existed. This addsProgressBar.hidden
which is the value of the new passed constructor fieldhidden
. This was mentioned in the comments as well but then the author faced issues getting it to work in tests. I'm sure we can get this to work however, if not, then we can at least document why it's there.ProgressBar._is_hidden
andProgressBar.hidden
intoProgressBar.is_hidden
.Potentially Included
These are primarily added in this separate section as I classified them as 8.2.0 though haven't necessarily been "agreed upon" by others (yet).
envvar
will return theflag_value
if set.click.get_pager_file()
#1572 might be made easier if rebased on Improve echo_via_pager behaviour in face of errors #2775. I said they can rebase on Improve echo_via_pager behaviour in face of errors #2775 and already start any work as we're aiming to get Improve echo_via_pager behaviour in face of errors #2775 in 8.2.0.click.Context
generic overobj
#2663Might need a documentation change.filename
and not introducefilenames
.__exit__
is called during shell completion #2767Next steps
I propose the following:
main
or another temporary branch, the latter being preferred imo.This assumes we do not add any more items to 8.2.0 so we can keep it manageable for now.
Let me know if this sounds like a good idea. I'm also available on Discord.
The text was updated successfully, but these errors were encountered: