bpo-42151: don't set specified_attributes=1 in pure Python ElementTree (GH-22987)

This commit is contained in:
Felix C. Stegerman 2021-02-24 03:25:31 +01:00 committed by GitHub
parent b9fe16a027
commit 1f433406bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 2 deletions

View file

@ -1560,7 +1560,6 @@ class XMLParser:
# Configure pyexpat: buffering, new-style attribute handling.
parser.buffer_text = 1
parser.ordered_attributes = 1
parser.specified_attributes = 1
self._doctype = None
self.entity = {}
try:
@ -1580,7 +1579,6 @@ class XMLParser:
for event_name in events_to_report:
if event_name == "start":
parser.ordered_attributes = 1
parser.specified_attributes = 1
def handler(tag, attrib_in, event=event_name, append=append,
start=self._start):
append((event, start(tag, attrib_in)))