click 8.2.0 seems to have broken pyre
Pyre Bug
Bug description
When trying to run pyre (just pyre without arguments, or also with other arguments that worked before), I now always get:
Usage: pyre [OPTIONS] COMMAND [ARGS]...
Try 'pyre -h' for help.
Error: Invalid value for '--version': <VersionKind.NONE: 'none'> is not one of 'none', 'client', 'client_and_binary'.
The only difference between a previous successfully CI run and the current situation is that click got updated from 8.1.x to 8.2.0.
Reproduction steps
Install pyre with click 8.2.0, run any pyre command like just pyre.
Expected behavior It does what requested on the command line.
Logs Please include any relevant logs here:
Usage: pyre [OPTIONS] COMMAND [ARGS]...
Try 'pyre -h' for help.
Error: Invalid value for '--version': <VersionKind.NONE: 'none'> is not one of 'none', 'client', 'client_and_binary'.
Experiencing the same thing. It seems that the introduction of iterables as possible list of choices seems to have broken it. In particular the changes in this PR.
With the introduction of the method normalize_choice, every Enum gets normalized to their name instead of their value and since it is case sensitive, we do not have a match for the --version flag since it tries to compare 'NONE' with 'none'
When setting case_sensitve=False here https://github.com/facebook/pyre-check/blob/ef2384a85d86a9163e320f1029f9d00297568c40/client/pyre.py#L188
and here https://github.com/facebook/pyre-check/blob/ef2384a85d86a9163e320f1029f9d00297568c40/client/pyre.py#L428
it runs through
I just saw that they added a version restriction here in the requirements.txt link to line. But I do not know when this will be released.