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 (see ). But if commit the patch from 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 code So, 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 changeset 02ec92fa7b1dddc23d479ee0b87dc283793505a8 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 in . |
|
|