Skip to content
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

Remove xml.etree.ElementTree.Element.copy() (Python implementation): use copy.copy() instead #94383

Closed
vstinner opened this issue Jun 28, 2022 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@vstinner
Copy link
Member

The xml.etree.ElementTree.Element.copy() method (Python implementation) was deprecated in Python 3.10 by commit 7d952de: see issue #76605 for the rationale.

The method only exists in the pure Python implementation. The C implementation only has a __copy__() method.

Use copy.copy() instead.

@vstinner vstinner added the type-bug An unexpected behavior, bug, or error label Jun 28, 2022
vstinner added a commit that referenced this issue Jul 4, 2022
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.
@vstinner vstinner closed this as completed Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant