Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 491ded7

Browse files
committed
Remove dependency from saxutils when loading xmlreader
1 parent 9f11cf8 commit 491ded7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/xml/sax/xmlreader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ def setProperty(self, name, value):
8585
"Sets the value of a SAX2 property."
8686
raise SAXNotRecognizedException("Property '%s' not recognized" % name)
8787

88-
import saxutils
89-
9088
class IncrementalParser(XMLReader):
9189
"""This interface adds three extra methods to the XMLReader
9290
interface that allow XML parsers to support incremental
@@ -112,6 +110,7 @@ def __init__(self, bufsize=2**16):
112110
XMLReader.__init__(self)
113111

114112
def parse(self, source):
113+
import saxutils
115114
source = saxutils.prepare_input_source(source)
116115

117116
self.prepareParser(source)

0 commit comments

Comments
 (0)