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

argparse: when wrong choice is selected, the error message prints available choices using repr() instead of str() #118839

Closed
rindeal opened this issue May 9, 2024 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@rindeal
Copy link
Contributor

rindeal commented May 9, 2024

Bug report

Bug description:

I tried using StrEnum for choices and it printed choose from <Enum.FOO: 'foo'>, ... instead of choose from foo, .....

Fix in #117766

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

@rindeal rindeal added the type-bug An unexpected behavior, bug, or error label May 9, 2024
rindeal added a commit to rindeal/python--cpython--dev-fork that referenced this issue May 9, 2024
Fixes: python#118839

Signed-off-by: Jan Chren (rindeal) <dev.rindeal@gmail.com>
rindeal added a commit to rindeal/python--cpython--dev-fork that referenced this issue Sep 25, 2024
Fixes: python#118839

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
rindeal added a commit to rindeal/python--cpython--dev-fork that referenced this issue Sep 25, 2024
Fixes: python#118839

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
rindeal added a commit to rindeal/python--cpython--dev-fork that referenced this issue Sep 25, 2024
Fixes: python#118839

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
rindeal added a commit to rindeal/python--cpython--dev-fork that referenced this issue Sep 25, 2024
Fixes: python#118839

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
rindeal added a commit to rindeal/python--cpython--dev-fork that referenced this issue Sep 25, 2024
Fixes: python#118839

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
@serhiy-storchaka
Copy link
Member

This is actually a duplicate of #86357.

@rindeal
Copy link
Contributor Author

rindeal commented Sep 27, 2024

This is actually a duplicate of #86357.

Good find. I've re-linked the PR and I'm closing this in favor of that issue.

@rindeal rindeal closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
Status: Doc issues
Development

No branches or pull requests

2 participants