
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2017-01-08 17:56 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| etree_remove_deprecated.patch | serhiy.storchaka,2017-01-08 17:56 | review | ||
| etree_remove_deprecated_getiterator.diff | serhiy.storchaka,2018-05-12 10:49 | Remove getchildren() and getiterator() | ||
| etree_remove_deprecated_cElementTree.diff | serhiy.storchaka,2018-05-12 10:49 | Remove xml.etree.cElementTree | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 6769 | merged | serhiy.storchaka,2018-05-12 10:11 | |
| Messages (9) | |||
|---|---|---|---|
| msg285000 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2017-01-08 17:56 | |
Proposed patch removes old-deprecated ElementTree features.* Methods Element.getchildren(), Element.getiterator() and ElementTree.getiterator() deprecated in 2.7 and 3.2. Use list(elem) or iteration instead of getchildren(), methods iter() instead of getiterator(). * The html argument of XMLParser deprecated in 3.4. The rest of arguments are keyword-only now (passing them as keywords was recommended in the documentatin).* The support of the doctype() method of XMLParser subclasses and its default implementation. Deprecated in 3.2. Define the doctype() method on a custom TreeBuilder target instead.* The xml.etree.cElementTree module deprecated in 3.3.Unfortunately some of these deprecations are in the documentation only or in Python implementatation, but not in C implementatation. Perhaps missed warnings should be added first (seeissue29204). But if commit the patch fromissue29204 in 3.6, perhaps deprecated features could be removed in 3.7. | |||
| msg309891 -(view) | Author: Stefan Behnel (scoder)*![]() | Date: 2018-01-13 17:10 | |
Patch looks right to me.I'd personally be ok with applying it to 3.7, but I'll leave the decision to you. Most of the removed "features" are non-controversial, except:- "getchildren()" is probably still in use, also because it's more efficient than "list(elem)" in lxml (and has never been deprecated there), so code that supports both libraries might have preferred it- cElementTree is probably still imported by quite a bit of codeSo, this will have an impact on user code, despite any previous deprecation warnings. But it's easy to resolve in a backwards compatible way. | |||
| msg311330 -(view) | Author: Cheryl Sabella (cheryl.sabella)*![]() | Date: 2018-01-31 13:47 | |
Serhiy,Did you want to revive this for 3.8? | |||
| msg316422 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2018-05-12 08:46 | |
getchildren() and getiterator() have deprecation notes in their docstrings in lxml.etree. | |||
| msg316423 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2018-05-12 10:20 | |
PR 6769 removes the html parameter and the doctype() method. getchildren() and getiterator() emit now a DeprecationWarning instead of PendingDeprecationWarning and will be removed in 3.9. | |||
| msg316424 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2018-05-12 10:49 | |
The following two patches will remove getchildren() and getiterator() (in 3.9) and xml.etree.cElementTree (in an unspecified future). | |||
| msg322280 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2018-07-24 09:03 | |
New changeset02ec92fa7b1dddc23d479ee0b87dc283793505a8 by Serhiy Storchaka in branch 'master':bpo-29209: Remove old-deprecated features in ElementTree. (GH-6769)https://github.com/python/cpython/commit/02ec92fa7b1dddc23d479ee0b87dc283793505a8 | |||
| msg339489 -(view) | Author: Jeroen Demeyer (jdemeyer)*![]() | Date: 2019-04-05 10:10 | |
This should be closed. | |||
| msg339534 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2019-04-06 16:16 | |
The rest will be removed inissue36543. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:41 | admin | set | github: 73395 |
| 2019-04-06 16:16:03 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: +msg339534 stage: patch review -> resolved |
| 2019-04-05 10:10:02 | jdemeyer | set | nosy: +jdemeyer messages: +msg339489 |
| 2018-07-24 09:03:40 | serhiy.storchaka | set | messages: +msg322280 |
| 2018-05-12 10:51:04 | serhiy.storchaka | set | versions: + Python 3.8, - Python 3.7 |
| 2018-05-12 10:49:51 | serhiy.storchaka | set | files: +etree_remove_deprecated_cElementTree.diff |
| 2018-05-12 10:49:22 | serhiy.storchaka | set | files: +etree_remove_deprecated_getiterator.diff messages: +msg316424 |
| 2018-05-12 10:20:04 | serhiy.storchaka | set | messages: +msg316423 |
| 2018-05-12 10:11:53 | serhiy.storchaka | set | pull_requests: +pull_request6457 |
| 2018-05-12 08:46:03 | serhiy.storchaka | set | messages: +msg316422 |
| 2018-01-31 13:47:37 | cheryl.sabella | set | nosy: +cheryl.sabella messages: +msg311330 |
| 2018-01-13 17:10:33 | scoder | set | messages: +msg309891 |
| 2017-12-24 19:23:22 | gphemsley | set | nosy: +gphemsley |
| 2017-01-08 17:56:53 | serhiy.storchaka | set | dependencies: +Add code deprecations in ElementTree |
| 2017-01-08 17:56:24 | serhiy.storchaka | create | |