[Python-3000-checkins] r51339 - python/branches/p3yk/Lib/xml/sax/__init__.py python/branches/p3yk/Lib/xml/sax/saxutils.py python/branches/p3yk/Lib/xml/sax/xmlreader.py
guido.van.rossum
python-3000-checkins at python.org
Thu Aug 17 11:10:10 CEST 2006
Author: guido.van.rossum
Date: Thu Aug 17 11:10:09 2006
New Revision: 51339
Modified:
python/branches/p3yk/Lib/xml/sax/__init__.py
python/branches/p3yk/Lib/xml/sax/saxutils.py
python/branches/p3yk/Lib/xml/sax/xmlreader.py
Log:
Use explicit relative import to make this work again.
Modified: python/branches/p3yk/Lib/xml/sax/__init__.py
==============================================================================
--- python/branches/p3yk/Lib/xml/sax/__init__.py (original)
+++ python/branches/p3yk/Lib/xml/sax/__init__.py Thu Aug 17 11:10:09 2006
@@ -19,9 +19,9 @@
expatreader -- Driver that allows use of the Expat parser with SAX.
"""
-from xmlreader import InputSource
-from handler import ContentHandler, ErrorHandler
-from _exceptions import SAXException, SAXNotRecognizedException, \
+from .xmlreader import InputSource
+from .handler import ContentHandler, ErrorHandler
+from ._exceptions import SAXException, SAXNotRecognizedException, \
SAXParseException, SAXNotSupportedException, \
SAXReaderNotAvailable
Modified: python/branches/p3yk/Lib/xml/sax/saxutils.py
==============================================================================
--- python/branches/p3yk/Lib/xml/sax/saxutils.py (original)
+++ python/branches/p3yk/Lib/xml/sax/saxutils.py Thu Aug 17 11:10:09 2006
@@ -4,8 +4,8 @@
"""
import os, urlparse, urllib, types
-import handler
-import xmlreader
+from . import handler
+from . import xmlreader
try:
_StringTypes = [types.StringType, types.UnicodeType]
Modified: python/branches/p3yk/Lib/xml/sax/xmlreader.py
==============================================================================
--- python/branches/p3yk/Lib/xml/sax/xmlreader.py (original)
+++ python/branches/p3yk/Lib/xml/sax/xmlreader.py Thu Aug 17 11:10:09 2006
@@ -1,9 +1,9 @@
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers
should be based on this code. """
-import handler
+from . import handler
-from _exceptions import SAXNotSupportedException, SAXNotRecognizedException
+from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException
# ===== XMLREADER =====
@@ -113,7 +113,7 @@
XMLReader.__init__(self)
def parse(self, source):
- import saxutils
+ from . import saxutils
source = saxutils.prepare_input_source(source)
self.prepareParser(source)
More information about the Python-3000-checkins
mailing list