Skip to content

gh-83648: Support deprecation of options, arguments and subcommands in argparse #114086

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

Merged
merged 8 commits into from
Feb 5, 2024

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 15, 2024

It is an alternative to #18208. Simpler and more complex at the same time.

On one hand, it only supports one argument: deprecated. On other hand, it supports deprecation of options (in all forms), positional arguments, and subcommands (with aliases). Warnings are localized and printed to stderr.


📚 Documentation preview 📚: https://cpython-previews--114086.org.readthedocs.build/

@hugovk hugovk changed the title gh-18208: Support deprecation of options, arguments and subcommands in argparse gh-83648: Support deprecation of options, arguments and subcommands in argparse Jan 15, 2024
Co-authored-by: Hugo van Kemenade <[email protected]>
Copy link
Member Author

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Thank you for your review @hugovk.

@rhettinger rhettinger removed their request for review January 16, 2024 04:46
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

👍

@serhiy-storchaka serhiy-storchaka merged commit bb57ffd into python:main Feb 5, 2024
@serhiy-storchaka serhiy-storchaka deleted the argparse-deprecated branch February 5, 2024 22:41
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants