bpo-29209: Remove old-deprecated features in ElementTree. by serhiy-storchaka · Pull Request #6769 · python/cpython

@serhiy-storchaka

@serhiy-storchaka

Also make getchildren() and getiterator() emitting
a DeprecationWarning instead of PendingDeprecationWarning.

Carreau

"This method will be removed in future versions. "
"Use 'tree.iter()' or 'list(tree.iter())' instead.",
PendingDeprecationWarning, stacklevel=2
DeprecationWarning, stacklevel=2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to update the messages to have the version since the deprecation and the planned removal version here (and on line 418) ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in the documentation.

Carreau

warnings.warn(
"The doctype() method of XMLParser is ignored. "
"Define doctype() method on the TreeBuilder target.",
RuntimeWarning)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here add versions ?

Carreau

@serhiy-storchaka

@serhiy-storchaka

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request

Jul 25, 2018

@serhiy-storchaka