[Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.14,1.14.6.1 expatreader.py,1.22.6.1,1.22.6.2

Tim Peters tim_one@users.sourceforge.net
Wed, 01 Aug 2001 19:40:45 -0700


Update of /cvsroot/python/python/dist/src/Lib/xml/sax
In directory usw-pr-cvs1:/tmp/cvs-serv23606/descr/dist/src/Lib/xml/sax

Modified Files:
      Tag: descr-branch
	__init__.py expatreader.py 
Log Message:
Mrege of trunk tag delta date2001-07-30 to date2001-08-01.


Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v
retrieving revision 1.14
retrieving revision 1.14.6.1
diff -C2 -d -r1.14 -r1.14.6.1
*** __init__.py	2000/10/23 18:09:50	1.14
--- __init__.py	2001/08/02 02:40:43	1.14.6.1
***************
*** 54,57 ****
--- 54,62 ----
  default_parser_list = ["xml.sax.expatreader"]
  
+ # tell modulefinder that importing sax potentially imports expatreader
+ _false = 0
+ if _false:
+     import xml.sax.expatreader
+ 
  import os, string, sys
  if os.environ.has_key("PY_SAX_PARSER"):

Index: expatreader.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v
retrieving revision 1.22.6.1
retrieving revision 1.22.6.2
diff -C2 -d -r1.22.6.1 -r1.22.6.2
*** expatreader.py	2001/07/07 22:55:29	1.22.6.1
--- expatreader.py	2001/08/02 02:40:43	1.22.6.2
***************
*** 10,14 ****
  # xml.parsers.expat does not raise ImportError in Jython
  import sys
! if sys.platform[ : 4] == "java":
      raise SAXReaderNotAvailable("expat not available in Java", None)
  del sys
--- 10,14 ----
  # xml.parsers.expat does not raise ImportError in Jython
  import sys
! if sys.platform[:4] == "java":
      raise SAXReaderNotAvailable("expat not available in Java", None)
  del sys
***************
*** 17,21 ****
      from xml.parsers import expat
  except ImportError:
!     raise SAXReaderNotAvailable("expat not supported",None)
  from xml.sax import xmlreader, saxutils, handler
  
--- 17,24 ----
      from xml.parsers import expat
  except ImportError:
!     raise SAXReaderNotAvailable("expat not supported", None)
! else:
!     if not hasattr(expat, "ParserCreate"):
!         raise SAXReaderNotAvailable("expat not supported", None)
  from xml.sax import xmlreader, saxutils, handler