diff options
author | Victor Stinner <vstinner@python.org> | 2022-07-04 13:51:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-04 13:51:01 (GMT) |
commit | fd76eb547dd5d2c8307a89422049b6c3c80541ab (patch) | |
tree | eec381f9b383e10a3e0e56233431242adb75957f /Lib/xml/etree | |
parent | fbcee570d1e15e5260a456cb71c8b0897dc76237 (diff) | |
download | cpython-fd76eb547dd5d2c8307a89422049b6c3c80541ab.zip cpython-fd76eb547dd5d2c8307a89422049b6c3c80541ab.tar.gz cpython-fd76eb547dd5d2c8307a89422049b6c3c80541ab.tar.bz2 |
gh-94383: Remove ElementTree.Element.copy() method (#94384)
xml.etree: Remove the ElementTree.Element.copy() method of the pure
Python implementation, deprecated in Python 3.10, use the copy.copy()
function instead. The C implementation of xml.etree has no copy()
method, only a __copy__() method.
Diffstat (limited to 'Lib/xml/etree')
-rw-r--r-- | Lib/xml/etree/ElementTree.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py index 1dc8035..ebbe2b7 100644 --- a/Lib/xml/etree/ElementTree.py +++ b/Lib/xml/etree/ElementTree.py @@ -188,19 +188,6 @@ class Element: """ return self.__class__(tag, attrib) - def copy(self): - """Return copy of current element. - - This creates a shallow copy. Subelements will be shared with the - original tree. - - """ - warnings.warn( - "elem.copy() is deprecated. Use copy.copy(elem) instead.", - DeprecationWarning - ) - return self.__copy__() - def __copy__(self): elem = self.makeelement(self.tag, self.attrib) elem.text = self.text |