From: Neal Norwitz Date: Fri, 24 Mar 2006 07:47:46 +0000 (+0000) Subject: Use *absolute* imports now that they are required. (Should this go into 2.5?) X-Git-Tag: v3.0a1~1464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2def11a90d1ea89af46c32ccb7e5dbe0bcaff73a;p=python Use *absolute* imports now that they are required. (Should this go into 2.5?) --- diff --git a/Lib/xmlcore/sax/__init__.py b/Lib/xmlcore/sax/__init__.py index f1e467c470..8afbdb0036 100644 --- a/Lib/xmlcore/sax/__init__.py +++ b/Lib/xmlcore/sax/__init__.py @@ -19,11 +19,11 @@ xmlreader -- Base classes and constants which define the SAX 2 API for 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, \ - SAXParseException, SAXNotSupportedException, \ - SAXReaderNotAvailable +from .xmlreader import InputSource +from .handler import ContentHandler, ErrorHandler +from ._exceptions import (SAXException, SAXNotRecognizedException, + SAXParseException, SAXNotSupportedException, + SAXReaderNotAvailable) def parse(source, handler, errorHandler=ErrorHandler()): diff --git a/Lib/xmlcore/sax/saxutils.py b/Lib/xmlcore/sax/saxutils.py index 582b0089c4..880de80cf4 100644 --- a/Lib/xmlcore/sax/saxutils.py +++ b/Lib/xmlcore/sax/saxutils.py @@ -4,8 +4,8 @@ convenience of application and driver writers. """ import os, urlparse, urllib, types -import handler -import xmlreader +from . import handler +from . import xmlreader try: _StringTypes = [types.StringType, types.UnicodeType] diff --git a/Lib/xmlcore/sax/xmlreader.py b/Lib/xmlcore/sax/xmlreader.py index 9a2361e349..6b37d37ab4 100644 --- a/Lib/xmlcore/sax/xmlreader.py +++ b/Lib/xmlcore/sax/xmlreader.py @@ -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 =====