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

Aperta
#156,667 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia dal punto di ingresso xml.dom.minidom ed esamina gli attributi e i metodi pubblici elencati nell’issue, insieme ai relativi commenti DOM Level 3. Confronta ogni nome attuale con il nome specificato nella Recommendation; il lavoro è completato quando i nomi specificati sono disponibili come alias senza compromettere i vecchi nomi, con una copertura adeguata nei test esistenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

docs topic-XML

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
Lingua principale
Python
Stelle
77.2k
Fork
36k
Merge medio
1g 9h
PR unite (30g)
558

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/cpython

Tutte le issue di python/cpython

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.