xml.dom.minidom uses names from superseded drafts of DOM Level 3
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
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.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 35/100