python / cpython

The Python programming language
https://www.python.org
Other
61.91k stars 29.78k forks source link

Refactor `xml.etree.ElementTree._namespaces` #120771

Open danifus opened 2 months ago

danifus commented 2 months ago

Feature or enhancement

Proposal:

Refactor of xml.etree.ElementTree._namespaces in preparation to simplify the logic to address the following gh issues, all of which require some changes to _namespaces:

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

danifus commented 2 months ago

As some more context about the benefits of the refactor, I've created another branch that includes the fixes for all the issues listed above based on this refactor (as a PR on my own fork): https://github.com/danifus/cpython/pull/3

If this approach looks good I'm happy to break this other branch down into a couple of separate PRs for each of the issues above and apply any suggested changes.