Skip to content
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

Argparse does not support subparser aliases in 2.7 #58087

Closed
TimWillis mannequin opened this issue Jan 26, 2012 · 7 comments
Closed

Argparse does not support subparser aliases in 2.7 #58087

TimWillis mannequin opened this issue Jan 26, 2012 · 7 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@TimWillis
Copy link
Mannequin

TimWillis mannequin commented Jan 26, 2012

BPO 13879
Nosy @ezio-melotti, @merwok
Files
  • argparse_aliases.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-02-04.07:20:07.519>
    created_at = <Date 2012-01-26.16:59:27.841>
    labels = ['type-bug', 'invalid', 'docs']
    title = 'Argparse does not support subparser aliases in 2.7'
    updated_at = <Date 2012-02-04.07:20:07.518>
    user = 'https://bugs.python.org/TimWillis'

    bugs.python.org fields:

    activity = <Date 2012-02-04.07:20:07.518>
    actor = 'eric.araujo'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2012-02-04.07:20:07.519>
    closer = 'eric.araujo'
    components = ['Documentation']
    creation = <Date 2012-01-26.16:59:27.841>
    creator = 'Tim.Willis'
    dependencies = []
    files = ['24339']
    hgrepos = []
    issue_num = 13879
    keywords = ['patch']
    message_count = 7.0
    messages = ['152024', '152092', '152094', '152128', '152512', '152545', '152596']
    nosy_count = 5.0
    nosy_names = ['bethard', 'ezio.melotti', 'eric.araujo', 'docs@python', 'Tim.Willis']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue13879'
    versions = ['Python 2.7']

    @TimWillis
    Copy link
    Mannequin Author

    TimWillis mannequin commented Jan 26, 2012

    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'

    @TimWillis TimWillis mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jan 26, 2012
    @TimWillis
    Copy link
    Mannequin Author

    TimWillis mannequin commented Jan 27, 2012

    Attaching a patch which merges aliases code from 3.2 back into 2.7.

    @TimWillis
    Copy link
    Mannequin Author

    TimWillis mannequin commented Jan 27, 2012

    adding package author to nosy list

    @bethard
    Copy link
    Mannequin

    bethard mannequin commented Jan 27, 2012

    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.

    @merwok
    Copy link
    Member

    merwok commented Feb 3, 2012

    Agreed, this looks like a doc glitch.

    @merwok merwok added docs Documentation in the Doc dir and removed stdlib Python modules in the Lib dir labels Feb 3, 2012
    @TimWillis
    Copy link
    Mannequin Author

    TimWillis mannequin commented Feb 3, 2012

    The documentation appears to be up to date in the current 2.7 repository, so this can probably be marked as closed/fixed.

    @merwok
    Copy link
    Member

    merwok commented Feb 4, 2012

    Ah, I did not see that your first message talked about the dev doc, which is 3.3.

    @merwok merwok closed this as completed Feb 4, 2012
    @merwok merwok added the invalid label Feb 4, 2012
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant