Skip to content

Refactor xml.etree.ElementTree._namespaces #120771

Description

@danifus

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

Activity

  1. added a commit that references this issue on Jun 20, 2024
  2. danifus commented on Jun 20, 2024

    @danifus
    ContributorAuthor

    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): danifus#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.

  3. joooeey commented on Apr 17, 2025

    @joooeey

    This may be related: #132637

  4. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-refactorCode refactoring (with no changes in behavior)
    and removed
    type-featureA feature request or enhancement
    on Jun 1, 2025
  5. serhiy-storchaka commented on Sep 15, 2026

    @serhiy-storchaka
    Member

    Sorry for not looking at this in time. _namespaces() was restructured in #156747 for gh-61290 and gh-113581 (it now maps prefixes to URIs and encodes attribute names separately), so #120772 no longer applies. gh-57587 is implemented on top of that in #157523, and gh-118416 is next. Thank you for the analysis.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-XMLtype-refactorCode refactoring (with no changes in behavior)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions