GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-83648: Support deprecation of options, arguments and subcommands in argparse by serhiy-storchaka · Pull Request #114086 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jan 15, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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/

  • Issue: Allow to deprecate CLI arguments in argparse #83648

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka
pythongh-18208: Support deprecation of options, arguments and subcomm…
0244cd8
…ands in argparse
@serhiy-storchaka
serhiy-storchaka requested a review from rhettinger January 15, 2024 19:20
@bedevere-app bedevere-app Bot added the awaiting core review label Jan 15, 2024
This was referenced Jan 15, 2024
Allow to deprecate CLI arguments in argparse #83648
Closed
bpo-39467: allow user to deprecate CLI arguments #18208
Closed
@serhiy-storchaka
Fix docs.
16edd19
hugovk
hugovk reviewed Jan 15, 2024
View reviewed changes
Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/argparse.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/argparse.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/argparse.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/argparse.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@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
@serhiy-storchaka @hugovk
Apply suggestions from code review
24396b9
Co-authored-by: Hugo van Kemenade <[email protected]>
serhiy-storchaka
serhiy-storchaka commented Jan 15, 2024
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member Author

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
hugovk
hugovk reviewed Jan 15, 2024
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2024-01-15-20-21-33.gh-issue-18208.HzD_fY.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka added 2 commits January 15, 2024 22:38
@serhiy-storchaka
Rename a NEWS file name.
54d7bba
@serhiy-storchaka
Skip doctests that print to stderr.
7aa0d88
@rhettinger
rhettinger removed their request for review January 16, 2024 04:46
@serhiy-storchaka
Remove unused import.
12d3bc9
hugovk
hugovk reviewed Jan 16, 2024
View reviewed changes
Comment thread Lib/argparse.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka
Apply suggestions.
5f72bc6
hugovk
hugovk approved these changes Jan 16, 2024
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jan 16, 2024
@serhiy-storchaka
Merge branch 'main' into argparse-deprecated
acf49d7
@serhiy-storchaka
serhiy-storchaka merged commit bb57ffd into python:main Feb 5, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label 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
@serhiy-storchaka @fsc-eriker
pythongh-83648: Support deprecation of options, arguments and subcomm…
7e56ab1
…ands in argparse (pythonGH-114086)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@serhiy-storchaka @hugovk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.