-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-126180: Remove getopt and optparse deprecation notices #126227
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
ncoghlan
merged 21 commits into
python:main
from
ncoghlan:reverse-getopt-optparse-deprecations
Dec 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a560986
Remove getopt and optparse deprecation notices
ncoghlan 0a568f1
Wording tweaks
ncoghlan 55b7215
Incorporate improvements from Serhiy's PR
ncoghlan 0971780
Grammar fix
ncoghlan 09b0237
Fix issue number reference
ncoghlan 4cdebde
Another wording tweak
ncoghlan 693a979
Update heading and description for new chapter
ncoghlan 50d1ee4
fileinput belongs in the new chapter
ncoghlan 4e50c74
Move getopt back to the superseded section
ncoghlan 0db2c88
Reword superseded chapter intro
ncoghlan e474e77
Simplify wording
ncoghlan 43234de
Merge remote-tracking branch 'origin/main' into reverse-getopt-optpar…
ncoghlan 93d7161
Updates based on Serhiy's feedback
ncoghlan bb91b52
Also reword What's New entry
ncoghlan 7cc72ad
Consistent getopt markup
ncoghlan 7f51456
Merge remote-tracking branch 'origin/main' into reverse-getopt-optpar…
ncoghlan 5d86774
Updates based on review feedback
ncoghlan c2ae293
Syntax fix
ncoghlan 5e2fcd9
Fix excess indentation in examples
ncoghlan 457ee88
Phrasing tweak
ncoghlan f67d20c
Merge branch 'main' into reverse-getopt-optparse-deprecations
ncoghlan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Incorporate improvements from Serhiy's PR
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
- Loading branch information
commit 55b72155bc4d623e37b41a1b3397c3618f588dc9
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
I would not recommend it for now. You can use it on your own risk.
optparsemay need more work, but it works as expected. I would recommend it for beginners, which cannot distinguish their own errors from peculiarities of the library.Uh oh!
There was an error while loading. Please reload this page.
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.
For this PR, I'd like to stick with the status quo as far as recommendations go (that is, only taking the step back from "
argparseis the only non-deprecated argument processing option in the standard library").Taking the extra step to saying "
argparseis not recommended overoptparseanymore, even for end user applications" would then be a separate follow up question.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.
Indeed. Keep the argparse recommendation. We're not going to dis-recommend the most widely used Python argument parsing library in the world (that causes churn and angst from users). Nor are we going to be adding yet another one to the stdlib in the future. argparse supports most users quite well, "warts" and all, with plenty of popular third party options for yet other behaviors beyond our stdlib options.