This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Argparse does not support subparser aliases in 2.7
Type: behavior Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Tim.Willis, bethard, docs@python, eric.araujo, ezio.melotti
Priority: normal Keywords: patch

Created on 2012-01-26 16:59 by Tim.Willis, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
argparse_aliases.patch Tim.Willis, 2012-01-27 13:05 review
Messages (7)
msg152024 - (view) Author: Tim Willis (Tim.Willis) Date: 2012-01-26 16:59
Argparse documentation in 2.7 indicates support for an 'aliases' kwarg.  (Fourth example down from http://docs.python.org/dev/library/argparse.html#sub-commands)

While aliases work as expected in 3.2, use in 2.7 results in TypeError: __init__() got an unexpected keyword argument 'aliases'
msg152092 - (view) Author: Tim Willis (Tim.Willis) Date: 2012-01-27 13:05
Attaching a patch which merges aliases code from 3.2 back into 2.7.
msg152094 - (view) Author: Tim Willis (Tim.Willis) Date: 2012-01-27 13:13
adding package author to nosy list
msg152128 - (view) Author: Steven Bethard (bethard) * (Python committer) Date: 2012-01-27 21:53
This is a new feature, not a bug, so I think the correct fix is to change the 2.7 documentation, since at this point 2.7 can only get bugfixes, not new features.
msg152512 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-03 13:58
Agreed, this looks like a doc glitch.
msg152545 - (view) Author: Tim Willis (Tim.Willis) Date: 2012-02-03 18:03
The documentation appears to be up to date in the current 2.7 repository, so this can probably be marked as closed/fixed.
msg152596 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-04 07:20
Ah, I did not see that your first message talked about the dev doc, which is 3.3.
History
Date User Action Args
2022-04-11 14:57:26adminsetgithub: 58087
2012-02-04 07:20:07eric.araujosetstatus: open -> closed
resolution: not a bug
messages: + msg152596

stage: resolved
2012-02-03 18:03:36Tim.Willissetmessages: + msg152545
2012-02-03 13:58:58eric.araujosetnosy: + eric.araujo, ezio.melotti, docs@python
messages: + msg152512

assignee: docs@python
components: + Documentation, - Library (Lib)
2012-01-27 21:53:49bethardsetmessages: + msg152128
2012-01-27 13:13:10Tim.Willissetnosy: + bethard
messages: + msg152094
2012-01-27 13:05:28Tim.Willissetfiles: + argparse_aliases.patch
keywords: + patch
messages: + msg152092
2012-01-26 16:59:27Tim.Williscreate