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

Skip to content

Commit 3b27105

Browse files
committed
Use explicit relative import to make this work again.
1 parent ba205d6 commit 3b27105

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

Lib/xml/sax/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
expatreader -- Driver that allows use of the Expat parser with SAX.
2020
"""
2121

22-
from xmlreader import InputSource
23-
from handler import ContentHandler, ErrorHandler
24-
from _exceptions import SAXException, SAXNotRecognizedException, \
22+
from .xmlreader import InputSource
23+
from .handler import ContentHandler, ErrorHandler
24+
from ._exceptions import SAXException, SAXNotRecognizedException, \
2525
SAXParseException, SAXNotSupportedException, \
2626
SAXReaderNotAvailable
2727

Lib/xml/sax/saxutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"""
55

66
import os, urlparse, urllib, types
7-
import handler
8-
import xmlreader
7+
from . import handler
8+
from . import xmlreader
99

1010
try:
1111
_StringTypes = [types.StringType, types.UnicodeType]

Lib/xml/sax/xmlreader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers
22
should be based on this code. """
33

4-
import handler
4+
from . import handler
55

6-
from _exceptions import SAXNotSupportedException, SAXNotRecognizedException
6+
from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException
77

88

99
# ===== XMLREADER =====
@@ -113,7 +113,7 @@ def __init__(self, bufsize=2**16):
113113
XMLReader.__init__(self)
114114

115115
def parse(self, source):
116-
import saxutils
116+
from . import saxutils
117117
source = saxutils.prepare_input_source(source)
118118

119119
self.prepareParser(source)

0 commit comments

Comments
 (0)