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

test.test_getargs2.TupleSubclass test failure #72273

Closed
rbtcollins opened this issue Sep 11, 2016 · 10 comments
Closed

test.test_getargs2.TupleSubclass test failure #72273

rbtcollins opened this issue Sep 11, 2016 · 10 comments
Assignees
Labels
3.7 (EOL) end of life deferred-blocker interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@rbtcollins
Copy link
Member

BPO 28086
Nosy @warsaw, @rhettinger, @gpshead, @rbtcollins, @ned-deily, @serhiy-storchaka, @zooba, @s-t-e-v-e-n-k
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • issue28086.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/serhiy-storchaka'
    closed_at = <Date 2016-09-22.16:45:30.712>
    created_at = <Date 2016-09-11.22:43:57.027>
    labels = ['interpreter-core', 'deferred-blocker', 'type-bug', '3.7']
    title = 'test.test_getargs2.TupleSubclass test failure'
    updated_at = <Date 2017-03-31.16:36:22.323>
    user = 'https://github.com/rbtcollins'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:22.323>
    actor = 'dstufft'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2016-09-22.16:45:30.712>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2016-09-11.22:43:57.027>
    creator = 'rbcollins'
    dependencies = []
    files = ['44785']
    hgrepos = []
    issue_num = 28086
    keywords = ['patch']
    message_count = 10.0
    messages = ['275879', '275882', '275936', '275956', '275961', '276066', '276071', '277213', '277227', '277232']
    nosy_count = 9.0
    nosy_names = ['barry', 'rhettinger', 'gregory.p.smith', 'rbcollins', 'ned.deily', 'python-dev', 'serhiy.storchaka', 'steve.dower', 'stevenk']
    pr_nums = ['552']
    priority = 'deferred blocker'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28086'
    versions = ['Python 3.6', 'Python 3.7']

    @rbtcollins
    Copy link
    Member Author

    The test.test_getargs2.TupleSubclass test is failing in master. I suspect its a fastcall fallout.

    @rbtcollins rbtcollins added the build The build process and cross-build label Sep 11, 2016
    @s-t-e-v-e-n-k
    Copy link
    Mannequin

    s-t-e-v-e-n-k mannequin commented Sep 11, 2016

    I've bisected this via the git mirror, and converting it to the hg changeset gives changeset 103659:51b635e81958 as what introduced this failure.

    @zooba
    Copy link
    Member

    zooba commented Sep 12, 2016

    I added a fix in 7793d34609cb assuming that the intent is to allow subclasses of tuple to be passed directly as *args rather than creating a new tuple. The original changeset seems to suggest this is the intent.

    @zooba zooba added type-bug An unexpected behavior, bug, or error and removed build The build process and cross-build labels Sep 12, 2016
    @ned-deily
    Copy link
    Member

    Serhiy, what do you think?

    @serhiy-storchaka
    Copy link
    Member

    Thank you for making buildbots green Steve.

    The intent of 51b635e81958 was avoiding needless copying. But this caused to leaking tuple subtype in case of single var-positional argument without other positional arguments. The intent of tests was checking that tuple subtype is not leaked to called function. There is a bug, but I need to find the place where tuple subtype should be converted to tuple without needless hitting performance.

    @serhiy-storchaka serhiy-storchaka added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Sep 12, 2016
    @serhiy-storchaka serhiy-storchaka self-assigned this Sep 12, 2016
    @gpshead
    Copy link
    Member

    gpshead commented Sep 12, 2016

    I'm marking this as a deferred blocker as i believe we want this resolved before we exit the betas.

    @serhiy-storchaka
    Copy link
    Member

    This bug is not so critical. This bug exists in 3.5 and 2.7. Tests was added in bpo-18531, but at that moment the bug already was fixed in 3.6 (maybe accidentally).

    @serhiy-storchaka
    Copy link
    Member

    The simplest way is just change PyTuple_Check to PyTuple_CheckExact in ceval.c. Maybe this is suboptimal for tuple subclasses (namedtuple?), but I think this is very rare case.

    @serhiy-storchaka serhiy-storchaka added the 3.7 (EOL) end of life label Sep 22, 2016
    @rhettinger
    Copy link
    Contributor

    The simplest way is just change PyTuple_Check to
    PyTuple_CheckExact in ceval.c.

    +1

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 22, 2016

    New changeset 5324906ae307 by Serhiy Storchaka in branch '3.6':
    Issue bpo-28086: Single var-positional argument of tuple subtype was passed
    https://hg.python.org/cpython/rev/5324906ae307

    New changeset 858afd17e3ee by Serhiy Storchaka in branch 'default':
    Issue bpo-28086: Single var-positional argument of tuple subtype was passed
    https://hg.python.org/cpython/rev/858afd17e3ee

    @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
    3.7 (EOL) end of life deferred-blocker interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    6 participants