xml.dom.minidom uses names from superseded drafts of DOM Level 3
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ entry point xml.dom.minidom và kiểm tra các thuộc tính và phương thức public được liệt kê trong issue, cùng với các chú thích DOM Level 3 của chúng. So sánh từng tên hiện tại với tên được chỉ định trong Recommendation; hoàn thành khi các tên được chỉ định có sẵn dưới dạng alias mà không làm hỏng các tên cũ, với mức độ bao phủ phù hợp trong các test hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 35/100