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: 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 issue18531, 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:36adminsetgithub: 72273
2017-03-31 16:36:22dstufftsetpull_requests: + pull_request957
2016-09-22 16:45:30serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-09-22 16:44:08python-devsetnosy: + python-dev
messages: + msg277232
2016-09-22 14:56:40rhettingersetnosy: + rhettinger
messages: + msg277227
2016-09-22 09:52:18serhiy.storchakasetfiles: + issue28086.patch
versions: + Python 3.7
messages: + msg277213

keywords: + patch
stage: needs patch -> patch review
2016-09-12 17:09:23serhiy.storchakasetmessages: + msg276071
2016-09-12 16:31:11gregory.p.smithsetpriority: normal -> deferred blocker
nosy: + gregory.p.smith
messages: + msg276066

2016-09-12 05:00:27serhiy.storchakasetversions: + Python 3.6
messages: + msg275961

assignee: serhiy.storchaka
components: + Interpreter Core
stage: commit review -> needs patch
2016-09-12 04:42:19ned.deilysetmessages: + msg275956
2016-09-12 03:18:43steve.dowersettype: compile error -> behavior
stage: needs patch -> commit review
2016-09-12 03:18:17steve.dowersetnosy: + ned.deily, steve.dower
messages: + msg275936
2016-09-11 23:02:29barrysetnosy: + barry
2016-09-11 22:59:08stevenksetnosy: + stevenk
messages: + msg275882
2016-09-11 22:43:57rbcollinscreate