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

Add sanity-check else case to regrtest option parsing #51573

Closed
bitdancer opened this issue Nov 14, 2009 · 4 comments
Closed

Add sanity-check else case to regrtest option parsing #51573

bitdancer opened this issue Nov 14, 2009 · 4 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@bitdancer
Copy link
Member

BPO 7324
Nosy @brettcannon, @pitrou, @bitdancer
Files
  • regrtest-detect-bad-option.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 = 'https://github.com/bitdancer'
    closed_at = <Date 2009-11-15.00:41:56.811>
    created_at = <Date 2009-11-14.18:43:09.458>
    labels = ['type-bug', 'tests']
    title = 'Add sanity-check else case to regrtest option parsing'
    updated_at = <Date 2009-11-15.00:41:56.809>
    user = 'https://github.com/bitdancer'

    bugs.python.org fields:

    activity = <Date 2009-11-15.00:41:56.809>
    actor = 'r.david.murray'
    assignee = 'r.david.murray'
    closed = True
    closed_date = <Date 2009-11-15.00:41:56.811>
    closer = 'r.david.murray'
    components = ['Tests']
    creation = <Date 2009-11-14.18:43:09.458>
    creator = 'r.david.murray'
    dependencies = []
    files = ['15330']
    hgrepos = []
    issue_num = 7324
    keywords = ['patch']
    message_count = 4.0
    messages = ['95249', '95254', '95255', '95267']
    nosy_count = 3.0
    nosy_names = ['brett.cannon', 'pitrou', 'r.david.murray']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7324'
    versions = ['Python 2.7', 'Python 3.2']

    @bitdancer
    Copy link
    Member Author

    In forward porting a patch to py3k I noticed that there is a 'g' option
    in the optparse argument list in regrtest in 2.x that is not present in
    3.x. But the surprising thing was that there are no docs for this
    option, nor any option handler in the 2.x regrtest.

    I propose to add an 'else' case to the option parsing loop that asks the
    user to report a bug if it is handed an unknown option. Patch attached.

    My one question is whether this might have been intentional for backward
    compatibility reasons: let -g be passed and ignore it silently. I'm
    guessing it was just a deletion oversight, though.

    @bitdancer bitdancer added type-feature A feature request or enhancement tests Tests in the Lib/test dir labels Nov 14, 2009
    @bitdancer
    Copy link
    Member Author

    That should have been 'getopt option list'.

    @brettcannon
    Copy link
    Member

    I bet it was an option oversight. Since regrtest is an internal tool we
    don't really need to fret about backwards-compatibility for anyone.

    @bitdancer
    Copy link
    Member Author

    Committed in r76276 through r76281, along with removing 'g' from the
    getopt list in 2.6. 3.1 still has other traces of the -g option; I
    haven't cleaned that up.

    @bitdancer bitdancer self-assigned this Nov 15, 2009
    @bitdancer bitdancer added type-bug An unexpected behavior, bug, or error and removed type-feature A feature request or enhancement labels Nov 15, 2009
    @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
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants