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.
Created on 2017年05月14日 15:38 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 1581 | merged | serhiy.storchaka, 2017年05月14日 15:44 | |
| Messages (4) | |||
|---|---|---|---|
| msg293652 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年05月14日 15:38 | |
Proposed patch add warnings in ElementTree and cElementTree modules (backports issue29204) when run Python with the -3 option and fixes several bugs in the etree package and its tests: The deprecation warning about the doctype() method was emitted when use xml.etree.ElementTree.XMLParser. Now it emitted only when use a subclass of XMLParser with defined doctype() method, as intended. In the test_bug_200708_close test an EchoTarget instance was incorrectly passed to XMLParser() as the html argument and silently ignored. Now it is passed as the target argument. Tests no longer failed when use the -m option for running only selected test methods. Checking warnings now is more specific, warnings are expected only when use deprecated features. |
|||
| msg293653 - (view) | Author: Stefan Behnel (scoder) * (Python committer) | Date: 2017年05月14日 15:59 | |
Looks good to me (didn't test it). Note that getchildren() is not deprecated in lxml because it's actually the fastest way to build a list of the children. It's faster than list(element) because it avoids the Python (C-level) iteration overhead. However, that probably wouldn't be substantial enough to merit adding it if it wasn't there already. I'm ok with deprecating the method in ET. It's redundant there. |
|||
| msg293654 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年05月14日 16:29 | |
getchildren() and getiterator() were deprecated in Python implementation for years (since updating to ElementTree 1.3 in Python 2.7 and 3.2). And they are documented as deprecated. Just C implementation didn't emit warnings. It may be too late to add unconditional deprecation warnings, but we can add them as Py3k warnings. I'm going to remove these deprecated methods in 3.8. |
|||
| msg293846 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年05月17日 07:08 | |
New changeset 09b52471f39ba280d836b945d47719c697af0b45 by Serhiy Storchaka in branch '2.7': bpo-30365: Backport warnings and fix bugs in ElementTree. (#1581) https://github.com/python/cpython/commit/09b52471f39ba280d836b945d47719c697af0b45 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:46 | admin | set | github: 74550 |
| 2017年05月18日 17:58:55 | serhiy.storchaka | link | issue29948 superseder |
| 2017年05月17日 07:09:16 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017年05月17日 07:08:14 | serhiy.storchaka | set | messages: + msg293846 |
| 2017年05月14日 16:29:33 | serhiy.storchaka | set | messages: + msg293654 |
| 2017年05月14日 15:59:15 | scoder | set | messages: + msg293653 |
| 2017年05月14日 15:44:28 | serhiy.storchaka | set | pull_requests: + pull_request1674 |
| 2017年05月14日 15:38:54 | serhiy.storchaka | create | |