-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
bpo-32424: Deprecate xml.etree.ElementTree.Element.copy() in favor of copy.copy() #12995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -194,6 +194,13 @@ def copy(self): | |
| original tree. | ||
|
|
||
| """ | ||
| warnings.warn( | ||
| "elem.copy() is deprecated. Use copy.copy(elem) instead.", | ||
| DeprecationWarning | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we should issue a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, I can't find any record of The first appearance of |
||
| ) | ||
| return self.__copy__() | ||
|
|
||
| def __copy__(self): | ||
| elem = self.makeelement(self.tag, self.attrib) | ||
| elem.text = self.text | ||
| elem.tail = self.tail | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Deprecate xml.etree.ElementTree.Element.copy() in favor of copy.copy(). | ||
|
|
||
| Patch by Gordon P. Hemsley |
Uh oh!
There was an error while loading. Please reload this page.