Issue 28086: test.test_getargs2.TupleSubclass test failure (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/72273

classification

Title: test.test_getargs2.TupleSubclass test failure
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.7, Python 3.6

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: barry, gregory.p.smith, ned.deily, python-dev, rbcollins, rhettinger, serhiy.storchaka, steve.dower, stevenk
Priority: deferred blocker Keywords: patch

Created on 2016-09-11 22:43 by rbcollins, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue28086.patch serhiy.storchaka,2016-09-22 09:52 review
Pull Requests
URL Status Linked Edit
PR 552 closed dstufft,2017-03-31 16:36
Messages (10)
msg275879 - (view) Author: Robert Collins (rbcollins) * (Python committer) Date: 2016-09-11 22:43
The test.test_getargs2.TupleSubclass test is failing in master. I suspect its a fastcall fallout.
msg275882 - (view) Author: Steve Kowalik (stevenk) Date: 2016-09-11 22:59
I've bisected this via the git mirror, and converting it to the hg changeset gives changeset 103659:51b635e81958 as what introduced this failure.
msg275936 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-12 03:18
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.
msg275956 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-09-12 04:42
Serhiy, what do you think?
msg275961 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-12 05:00
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.
msg276066 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2016-09-12 16:31
I'm marking this as a deferred blocker as i believe we want this resolved before we exit the betas.
msg276071 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-12 17:09
This bug is not so critical. This bug exists in 3.5 and 2.7. Tests was added in , but at that moment the bug already was fixed in 3.6 (maybe accidentally).
msg277213 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-22 09:52
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.
msg277227 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-09-22 14:56
> The simplest way is just change PyTuple_Check to > PyTuple_CheckExact in ceval.c. +1
msg277232 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-22 16:44
New changeset 5324906ae307 by Serhiy Storchaka in branch '3.6': Issue #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 #28086: Single var-positional argument of tuple subtype was passed https://hg.python.org/cpython/rev/858afd17e3ee
History
Date User Action Args
2022-04-11 14:58:36 admin set github: 72273
2017-03-31 16:36:22 dstufft set pull_requests: + <pull%5Frequest957>
2016-09-22 16:45:30 serhiy.storchaka set status: open -> closedresolution: fixedstage: patch review -> resolved
2016-09-22 16:44:08 python-dev set nosy: + python-devmessages: +
2016-09-22 14:56:40 rhettinger set nosy: + rhettingermessages: +
2016-09-22 09:52:18 serhiy.storchaka set files: + issue28086.patchversions: + Python 3.7messages: + keywords: + patchstage: needs patch -> patch review
2016-09-12 17:09:23 serhiy.storchaka set messages: +
2016-09-12 16:31:11 gregory.p.smith set priority: normal -> deferred blockernosy: + gregory.p.smithmessages: +
2016-09-12 05:00:27 serhiy.storchaka set versions: + Python 3.6messages: + assignee: serhiy.storchakacomponents: + Interpreter Corestage: commit review -> needs patch
2016-09-12 04:42:19 ned.deily set messages: +
2016-09-12 03🔞43 steve.dower set type: compile error -> behaviorstage: needs patch -> commit review
2016-09-12 03🔞17 steve.dower set nosy: + ned.deily, steve.dowermessages: +
2016-09-11 23:02:29 barry set nosy: + barry
2016-09-11 22:59:08 stevenk set nosy: + stevenkmessages: +
2016-09-11 22:43:57 rbcollins create