-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
GH-127133: Remove ability to nest argument groups and mutex groups #127186
base: main
Are you sure you want to change the base?
Conversation
Lib/argparse.py
Outdated
) | ||
return super().add_argument_group(*args, **kwargs) | ||
|
||
raise ValueError('nested argument groups are not supported') |
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 think this is the right error type but let me know if there's a more appropriate type.
@iritkatriel Perhaps you can take a look at this one if you've got bandwidth, since you added the original deprecation warnings |
I took a look and ran branch coverage with a couple of different programs, and nothing stood out to me, so I think it's fine to proceed with this and then tackle any other potential refactorings in separate PRs. |
Co-authored-by: Irit Katriel <[email protected]>
This PR removes the ability to:
add_argument_group
on an argument groupadd_argument_group
oradd_mutually_exclusive_group
on a mutually exclusive groupWe have been warning users of this deprecation since 3.11.
📚 Documentation preview 📚: https://cpython-previews--127186.org.readthedocs.build/