Skip to content

bpo-13127: Fix attr name setter behavior #14757

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

potomak
Copy link
Contributor

@potomak potomak commented Jul 13, 2019

Update the implementation of attributes name setter to correctly
replace the attribute in the owner element.

The update is divided in three main steps:

  1. update the implementation of Attr._set_name to behave more
    similarly to Document.renameNode

  2. update the implementation of Document.renameNode to use
    Attr._set_name if the node is of type "attribute"

  3. create a new function _parseName, that is used in both
    Attr._set_name and Document.renameNode, to reduce code
    duplication

https://bugs.python.org/issue13127

Update the implementation of attributes `name` setter to correctly
replace the attribute in the owner element.

The update is divided in three main steps:

1. update the implementation of `Attr._set_name` to behave more
   similarly to `Document.renameNode`

2. update the implementation of `Document.renameNode` to use
   `Attr._set_name` if the node is of type "attribute"

3. create a new function `_parseName`, that is used in both
   `Attr._set_name` and `Document.renameNode`, to reduce code
   duplication
@python-cla-bot
Copy link

python-cla-bot bot commented Apr 6, 2025

The following commit authors need to sign the Contributor License Agreement:

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants