Update xml and test_xml_etree · RustPython/RustPython@2eec919 · GitHub
Skip to content

Commit 2eec919

Browse files
CPython Developersyouknowone
authored andcommitted
Update xml and test_xml_etree
1 parent 628c4c0 commit 2eec919

13 files changed

Lines changed: 358 additions & 168 deletions

Lib/test/test_xml_etree.py

Lines changed: 77 additions & 25 deletions

Lib/xml/dom/expatbuilder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,11 @@ def parseFile(self, file):
204204
buffer = file.read(16*1024)
205205
if not buffer:
206206
break
207-
parser.Parse(buffer, 0)
207+
parser.Parse(buffer, False)
208208
if first_buffer and self.document.documentElement:
209209
self._setup_subset(buffer)
210210
first_buffer = False
211-
parser.Parse("", True)
211+
parser.Parse(b"", True)
212212
except ParseEscape:
213213
pass
214214
doc = self.document
@@ -637,7 +637,7 @@ def parseString(self, string):
637637
nsattrs = self._getNSattrs() # get ns decls from node's ancestors
638638
document = _FRAGMENT_BUILDER_TEMPLATE % (ident, subset, nsattrs)
639639
try:
640-
parser.Parse(document, 1)
640+
parser.Parse(document, True)
641641
except:
642642
self.reset()
643643
raise
@@ -697,7 +697,7 @@ def external_entity_ref_handler(self, context, base, systemId, publicId):
697697
self.fragment = self.document.createDocumentFragment()
698698
self.curNode = self.fragment
699699
try:
700-
parser.Parse(self._source, 1)
700+
parser.Parse(self._source, True)
701701
finally:
702702
self.curNode = old_cur_node
703703
self.document = old_document

Lib/xml/dom/minidom.py

Lines changed: 43 additions & 13 deletions

0 commit comments

Comments
 (0)