[Python-3000-checkins] r43280 - python/branches/p3yk/Lib/xmlcore/sax/__init__.py python/branches/p3yk/Lib/xmlcore/sax/saxutils.py python/branches/p3yk/Lib/xmlcore/sax/xmlreader.py

neal.norwitz python-3000-checkins at python.org
Fri Mar 24 08:47:46 CET 2006


Author: neal.norwitz
Date: Fri Mar 24 08:47:46 2006
New Revision: 43280

Modified:
   python/branches/p3yk/Lib/xmlcore/sax/__init__.py
   python/branches/p3yk/Lib/xmlcore/sax/saxutils.py
   python/branches/p3yk/Lib/xmlcore/sax/xmlreader.py
Log:
Use *absolute* imports now that they are required.  (Should this go into 2.5?)

Modified: python/branches/p3yk/Lib/xmlcore/sax/__init__.py
==============================================================================
--- python/branches/p3yk/Lib/xmlcore/sax/__init__.py	(original)
+++ python/branches/p3yk/Lib/xmlcore/sax/__init__.py	Fri Mar 24 08:47:46 2006
@@ -19,11 +19,11 @@
 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()):

Modified: python/branches/p3yk/Lib/xmlcore/sax/saxutils.py
==============================================================================
--- python/branches/p3yk/Lib/xmlcore/sax/saxutils.py	(original)
+++ python/branches/p3yk/Lib/xmlcore/sax/saxutils.py	Fri Mar 24 08:47:46 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/xmlcore/sax/xmlreader.py
==============================================================================
--- python/branches/p3yk/Lib/xmlcore/sax/xmlreader.py	(original)
+++ python/branches/p3yk/Lib/xmlcore/sax/xmlreader.py	Fri Mar 24 08:47:46 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 =====


More information about the Python-3000-checkins mailing list