
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2016-09-29 19:44 bymitya57, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| etree.patch | vstinner,2016-09-29 20:05 | review | ||
| test_getiterator.patch | serhiy.storchaka,2016-09-29 20:29 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft,2017-03-31 16:36 | |
| Messages (8) | |||
|---|---|---|---|
| msg277717 -(view) | Author: Dmitry Shachnev (mitya57)* | Date: 2016-09-29 19:44 | |
The documentation says that getiterator() still accepts a tag argument, but it does not:>>> from xml.etree.ElementTree import Element>>> el = Element('foo')>>> el.getiterator('bar')Traceback (most recent call last): File "<stdin>", line 1, in <module>SystemError: ../Python/getargs.c:1508: bad argument to internal function>>> el.getiterator(tag='bar')Traceback (most recent call last): File "<stdin>", line 1, in <module>TypeError: iter() takes at most 1 argument (140172072006928 given)This is with Python 3.6.0 beta 1 on Debian GNU/Linux amd64. | |||
| msg277719 -(view) | Author: Ned Deily (ned.deily)*![]() | Date: 2016-09-29 19:51 | |
Even better:Python 3.6.0b1 (v3.6.0b1:5b0ca4ed5e2f, Sep 12 2016, 09:24:46)[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> from xml.etree.ElementTree import Element>>> el = Element('foo')>>> el.getiterator('bar')Segmentation fault: 11 | |||
| msg277721 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-09-29 19:59 | |
The bug seems related to the new FASTCALL calling convention introduced in Python 3.6b1. For an unknown reason, the METH_FASTCALL defined inModules/clinic/_elementtree.c on _elementtree_Element_iter() seems to be ignored or lost somewhere? | |||
| msg277722 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-09-29 20:05 | |
Oh...Modules/_elementtree.c uses a function defined inModules/clinic/_elementtree.c. It hardcodes flags, whereas flags changed.Maybe the alias should be created differently to avoid such issue in the future?Moreover, obviously, we lack unit tests on this getiterator() method. | |||
| msg277723 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-09-29 20:14 | |
New changeset1e29dca5dc4c by Victor Stinner in branch '3.6':Fix xml.etree.ElementTree.Element.getiterator()https://hg.python.org/cpython/rev/1e29dca5dc4c | |||
| msg277724 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-09-29 20:16 | |
I pushed the first obvious fix to unblock the 3.6 beta 2 release scheduled for next monday. | |||
| msg277725 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-09-29 20:29 | |
Here is a test. | |||
| msg279370 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-10-25 07:38 | |
New changesetca1b91829edf by Serhiy Storchaka in branch '3.5':Issue#28314: Added tests for xml.etree.ElementTree.Element.getiterator().https://hg.python.org/cpython/rev/ca1b91829edfNew changesetc14a2d2a3b19 by Serhiy Storchaka in branch '3.6':Issue#28314: Added tests for xml.etree.ElementTree.Element.getiterator().https://hg.python.org/cpython/rev/c14a2d2a3b19New changeset17334c1d9245 by Serhiy Storchaka in branch 'default':Issue#28314: Added tests for xml.etree.ElementTree.Element.getiterator().https://hg.python.org/cpython/rev/17334c1d9245 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:37 | admin | set | github: 72501 |
| 2017-03-31 16:36:26 | dstufft | set | pull_requests: +pull_request1004 |
| 2016-10-25 07:38:56 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2016-10-25 07:38:24 | python-dev | set | messages: +msg279370 |
| 2016-10-10 19:08:50 | ned.deily | set | stage: needs patch -> patch review |
| 2016-09-29 20:29:55 | serhiy.storchaka | set | files: +test_getiterator.patch messages: +msg277725 |
| 2016-09-29 20:16:20 | vstinner | set | priority: release blocker -> messages: +msg277724 |
| 2016-09-29 20:14:46 | python-dev | set | nosy: +python-dev messages: +msg277723 |
| 2016-09-29 20:14:08 | serhiy.storchaka | set | nosy: +serhiy.storchaka |
| 2016-09-29 20:07:47 | vstinner | set | priority: critical -> release blocker |
| 2016-09-29 20:05:45 | vstinner | set | files: +etree.patch keywords: +patch messages: +msg277722 |
| 2016-09-29 19:59:48 | vstinner | set | nosy: +vstinner messages: +msg277721 |
| 2016-09-29 19:51:05 | ned.deily | set | priority: normal -> critical type: behavior -> crash versions: + Python 3.7 nosy: +ned.deily messages: +msg277719 stage: needs patch |
| 2016-09-29 19:44:06 | mitya57 | create | |