python / python/cpython

xml.dom.minidom uses names from superseded drafts of DOM Level 3

Open
#156,667 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs topic-XML
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Several public attributes and methods of xml.dom.minidom come from working drafts of DOM Level 3, and were renamed before the Recommendation was published in 2004. The code says so itself:

# DOM Level 3 attributes, based on the 22 Oct 2002 draft
# DOM Level 3 (WD 9 April 2002)
minidom DOM Level 3 Core
Node.getInterface(), DOMImplementation.getInterface() getFeature()
Attr.schemaType, Element.schemaType schemaTypeInfo
Text.isWhitespaceInElementContent isElementContentWhitespace
Document.actualEncoding inputEncoding
Document.encoding xmlEncoding
Document.version xmlVersion
Document.standalone xmlStandalone
Entity.actualEncoding, Entity.encoding, Entity.version the same three renames

Document.errorHandler is from the same drafts; in the Recommendation it became a parameter of domConfig.

None of these names are documented, so nothing tells a user that they are neither DOM Level 1/2 (which xml.dom documents) nor DOM Level 3 (which minidom does not claim, see gh-50348).

Adding the specified names and keeping the old ones as aliases breaks nothing, and lets the documented API match the specification.

Linked PRs
  • gh-156696

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the xml.dom.minidom entry point and inspect the public attributes and methods listed in the issue, along with their DOM Level 3 comments. Compare each current name with the specified Recommendation name; done means the specified names are available as aliases without breaking the old names, with appropriate coverage in the existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.