[Python-checkins] python/dist/src/Lib DocXMLRPCServer.py,1.1,1.2 _strptime.py,1.14,1.15 markupbase.py,1.7,1.8 optparse.py,1.3,1.4 platform.py,1.2,1.3 sgmllib.py,1.43,1.44 shelve.py,1.21,1.22 stringprep.py,1.1,1.2 trace.py,1.6,1.7

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Thu, 24 Apr 2003 09:03:18 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv21022/Lib

Modified Files:
	DocXMLRPCServer.py _strptime.py markupbase.py optparse.py 
	platform.py sgmllib.py shelve.py stringprep.py trace.py 
Log Message:
Whitespace normalization.


Index: DocXMLRPCServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/DocXMLRPCServer.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DocXMLRPCServer.py	18 Apr 2003 21:04:38 -0000	1.1
--- DocXMLRPCServer.py	24 Apr 2003 16:02:41 -0000	1.2
***************
*** 23,27 ****
  class ServerHTMLDoc(pydoc.HTMLDoc):
      """Class used to generate pydoc HTML document for a server"""
!     
      def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
          """Mark up some plain text, given a context of symbols to look for.
--- 23,27 ----
  class ServerHTMLDoc(pydoc.HTMLDoc):
      """Class used to generate pydoc HTML document for a server"""
! 
      def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
          """Mark up some plain text, given a context of symbols to look for.
***************
*** 64,68 ****
          results.append(escape(text[here:]))
          return ''.join(results)
!     
      def docroutine(self, object, name=None, mod=None,
                     funcs={}, classes={}, methods={}, cl=None):
--- 64,68 ----
          results.append(escape(text[here:]))
          return ''.join(results)
! 
      def docroutine(self, object, name=None, mod=None,
                     funcs={}, classes={}, methods={}, cl=None):
***************
*** 73,77 ****
  
          title = '<a name="%s"><strong>%s</strong></a>' % (anchor, name)
!             
          if inspect.ismethod(object):
              args, varargs, varkw, defaults = inspect.getargspec(object.im_func)
--- 73,77 ----
  
          title = '<a name="%s"><strong>%s</strong></a>' % (anchor, name)
! 
          if inspect.ismethod(object):
              args, varargs, varkw, defaults = inspect.getargspec(object.im_func)
***************
*** 97,101 ****
          else:
              docstring = pydoc.getdoc(object)
!                 
          decl = title + argspec + (note and self.grey(
                 '<font face="helvetica, arial">%s</font>' % note))
--- 97,101 ----
          else:
              docstring = pydoc.getdoc(object)
! 
          decl = title + argspec + (note and self.grey(
                 '<font face="helvetica, arial">%s</font>' % note))
***************
*** 113,120 ****
              fdict[key] = '#-' + key
              fdict[value] = fdict[key]
!             
!         head = '<big><big><strong>%s</strong></big></big>' % server_name            
          result = self.heading(head, '#ffffff', '#7799ee')
!        
          doc = self.markup(package_documentation, self.preformat, fdict)
          doc = doc and '<tt>%s</tt>' % doc
--- 113,120 ----
              fdict[key] = '#-' + key
              fdict[value] = fdict[key]
! 
!         head = '<big><big><strong>%s</strong></big></big>' % server_name
          result = self.heading(head, '#ffffff', '#7799ee')
! 
          doc = self.markup(package_documentation, self.preformat, fdict)
          doc = doc and '<tt>%s</tt>' % doc
***************
*** 137,141 ****
      be constructed directly.
      """
!     
      def __init__(self):
          # setup variables used for HTML documentation
--- 137,141 ----
      be constructed directly.
      """
! 
      def __init__(self):
          # setup variables used for HTML documentation
***************
*** 171,175 ****
          _methodHelp(method_name) method to provide the help text used
          in the documentation."""
!         
          methods = {}
  
--- 171,175 ----
          _methodHelp(method_name) method to provide the help text used
          in the documentation."""
! 
          methods = {}
  
***************
*** 209,213 ****
                                  methods
                              )
!                                         
          return documenter.page(self.server_title, documentation)
  
--- 209,213 ----
                                  methods
                              )
! 
          return documenter.page(self.server_title, documentation)
  
***************
*** 228,232 ****
          documentation.
          """
!         
          response = self.server.generate_html_documentation()
          self.send_response(200)
--- 228,232 ----
          documentation.
          """
! 
          response = self.server.generate_html_documentation()
          self.send_response(200)
***************
*** 252,256 ****
          SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests)
          XMLRPCDocGenerator.__init__(self)
!         
  class DocCGIXMLRPCRequestHandler(   CGIXMLRPCRequestHandler,
                                      XMLRPCDocGenerator):
--- 252,256 ----
          SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests)
          XMLRPCDocGenerator.__init__(self)
! 
  class DocCGIXMLRPCRequestHandler(   CGIXMLRPCRequestHandler,
                                      XMLRPCDocGenerator):
***************
*** 282,287 ****
          Converts an angle in degrees to an angle in radians"""
          import math
!         return deg * math.pi / 180        
!         
      server = DocXMLRPCServer(("localhost", 8000))
  
--- 282,287 ----
          Converts an angle in degrees to an angle in radians"""
          import math
!         return deg * math.pi / 180
! 
      server = DocXMLRPCServer(("localhost", 8000))
  
***************
*** 300,302 ****
      server.register_introspection_functions()
  
!     server.serve_forever()        
\ No newline at end of file
--- 300,302 ----
      server.register_introspection_functions()
  
!     server.serve_forever()

Index: _strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** _strptime.py	19 Apr 2003 04:00:54 -0000	1.14
--- _strptime.py	24 Apr 2003 16:02:41 -0000	1.15
***************
*** 375,382 ****
      def pattern(self, format):
          """Return re pattern for the format string.
!         
          Need to make sure that any characters that might be interpreted as
          regex syntax is escaped.
!         
          """
          processed_format = ''
--- 375,382 ----
      def pattern(self, format):
          """Return re pattern for the format string.
! 
          Need to make sure that any characters that might be interpreted as
          regex syntax is escaped.
! 
          """
          processed_format = ''
***************
*** 529,531 ****
      else:
          raise ValueError("value not in list")
- 
--- 529,530 ----

Index: markupbase.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/markupbase.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** markupbase.py	30 Mar 2003 14:25:39 -0000	1.7
--- markupbase.py	24 Apr 2003 16:02:42 -0000	1.8
***************
*** 61,70 ****
          # deployed," this should only be the document type
          # declaration ("<!DOCTYPE html...>").
!         # ISO 8879:1986, however, has more complex 
          # declaration syntax for elements in <!...>, including:
          # --comment--
          # [marked section]
!         # name in the following list: ENTITY, DOCTYPE, ELEMENT, 
!         # ATTLIST, NOTATION, SHORTREF, USEMAP, 
          # LINKTYPE, LINK, IDLINK, USELINK, SYSTEM
          rawdata = self.rawdata
--- 61,70 ----
          # deployed," this should only be the document type
          # declaration ("<!DOCTYPE html...>").
!         # ISO 8879:1986, however, has more complex
          # declaration syntax for elements in <!...>, including:
          # --comment--
          # [marked section]
!         # name in the following list: ENTITY, DOCTYPE, ELEMENT,
!         # ATTLIST, NOTATION, SHORTREF, USEMAP,
          # LINKTYPE, LINK, IDLINK, USELINK, SYSTEM
          rawdata = self.rawdata
***************
*** 152,156 ****
              self.unknown_decl(rawdata[i+3: j])
          return match.end(0)
!             
      # Internal -- parse comment, return length or -1 if not terminated
      def parse_comment(self, i, report=1):
--- 152,156 ----
              self.unknown_decl(rawdata[i+3: j])
          return match.end(0)
! 
      # Internal -- parse comment, return length or -1 if not terminated
      def parse_comment(self, i, report=1):

Index: optparse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/optparse.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** optparse.py	21 Apr 2003 02:40:34 -0000	1.3
--- optparse.py	24 Apr 2003 16:02:42 -0000	1.4
***************
*** 1381,1383 ****
  # classes.
  make_option = Option
- 
--- 1381,1382 ----

Index: platform.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/platform.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** platform.py	24 Apr 2003 11:46:35 -0000	1.2
--- platform.py	24 Apr 2003 16:02:42 -0000	1.3
***************
*** 111,116 ****
  _libc_search = re.compile(r'(__libc_init)'
                            '|'
!                           '(GLIBC_([0-9.]+))' 
!                           '|' 
                            '(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)')
  
--- 111,116 ----
  _libc_search = re.compile(r'(__libc_init)'
                            '|'
!                           '(GLIBC_([0-9.]+))'
!                           '|'
                            '(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)')
  
***************
*** 127,131 ****
          Note that the function has intimate knowledge of how different
          libc versions add symbols to the executable is probably only
!         useable for executables compiled using gcc. 
  
          The file is read and scanned in chunks of chunksize bytes.
--- 127,131 ----
          Note that the function has intimate knowledge of how different
          libc versions add symbols to the executable is probably only
!         useable for executables compiled using gcc.
  
          The file is read and scanned in chunks of chunksize bytes.
***************
*** 165,169 ****
  def _dist_try_harder(distname,version,id):
  
!     """ Tries some special tricks to get the distribution 
          information in case the default method fails.
  
--- 165,169 ----
  def _dist_try_harder(distname,version,id):
  
!     """ Tries some special tricks to get the distribution
          information in case the default method fails.
  
***************
*** 377,381 ****
      """ Tries to figure out the OS version used and returns
          a tuple (system,release,version).
!         
          It uses the "ver" shell command for this which is known
          to exists on Windows, DOS and OS/2. XXX Others too ?
--- 377,381 ----
      """ Tries to figure out the OS version used and returns
          a tuple (system,release,version).
! 
          It uses the "ver" shell command for this which is known
          to exists on Windows, DOS and OS/2. XXX Others too ?
***************
*** 502,506 ****
      except:
          return release,version,csd,ptype
!     
      # Parse values
      #subversion = _win32_getvalue(keyCurVer,
--- 502,506 ----
      except:
          return release,version,csd,ptype
! 
      # Parse values
      #subversion = _win32_getvalue(keyCurVer,
***************
*** 582,586 ****
          versioninfo = (version,stage,nonrel)
      if sysa:
!         machine = {0x1: '68k', 
                     0x2: 'PowerPC'}.get(sysa,'')
      return release,versioninfo,machine
--- 582,586 ----
          versioninfo = (version,stage,nonrel)
      if sysa:
!         machine = {0x1: '68k',
                     0x2: 'PowerPC'}.get(sysa,'')
      return release,versioninfo,machine
***************
*** 595,599 ****
  
  def java_ver(release='',vendor='',vminfo=('','',''),osinfo=('','','')):
!     
      """ Version interface for JPython.
  
--- 595,599 ----
  
  def java_ver(release='',vendor='',vminfo=('','',''),osinfo=('','','')):
! 
      """ Version interface for JPython.
  
***************
*** 624,628 ****
      os_version = _java_getprop('java.os.version',os_version)
      osinfo = os_name,os_version,os_arch
!     
      return release,vendor,vminfo,osinfo
  
--- 624,628 ----
      os_version = _java_getprop('java.os.version',os_version)
      osinfo = os_name,os_version,os_arch
! 
      return release,vendor,vminfo,osinfo
  
***************
*** 844,848 ****
              size = struct.calcsize('l')
          bits = str(size*8) + 'bit'
!     
      # Get data from the 'file' system command
      output = _syscmd_file(executable,'')
--- 844,848 ----
              size = struct.calcsize('l')
          bits = str(size*8) + 'bit'
! 
      # Get data from the 'file' system command
      output = _syscmd_file(executable,'')
***************
*** 851,855 ****
         executable == sys.executable:
          # "file" command did not return anything; we'll try to provide
!         # some sensible defaults then... 
          if _default_architecture.has_key(sys.platform):
              b,l = _default_architecture[sys.platform]
--- 851,855 ----
         executable == sys.executable:
          # "file" command did not return anything; we'll try to provide
!         # some sensible defaults then...
          if _default_architecture.has_key(sys.platform):
              b,l = _default_architecture[sys.platform]
***************
*** 862,866 ****
      # Split the output into a list of strings omitting the filename
      fileout = _architecture_split(output)[1:]
!     
      if 'executable' not in fileout:
          # Format not supported
--- 862,866 ----
      # Split the output into a list of strings omitting the filename
      fileout = _architecture_split(output)[1:]
! 
      if 'executable' not in fileout:
          # Format not supported
***************
*** 896,900 ****
  
  ### Portable uname() interface
!     
  _uname_cache = None
  
--- 896,900 ----
  
  ### Portable uname() interface
! 
  _uname_cache = None
  
***************
*** 935,939 ****
              if release and version:
                  use_syscmd_ver = 0
!         
          # Try the 'ver' system command available on some
          # platforms
--- 935,939 ----
              if release and version:
                  use_syscmd_ver = 0
! 
          # Try the 'ver' system command available on some
          # platforms
***************
*** 1141,1145 ****
      """ Returns a single string identifying the underlying platform
          with as much useful information as possible (but no more :).
!         
          The output is intended to be human readable rather than
          machine parseable. It may look different on different
--- 1141,1145 ----
      """ Returns a single string identifying the underlying platform
          with as much useful information as possible (but no more :).
! 
          The output is intended to be human readable rather than
          machine parseable. It may look different on different
***************
*** 1216,1220 ****
              bits,linkage = architecture(sys.executable)
              platform = _platform(system,release,machine,processor,bits,linkage)
!     
      if aliased:
          _platform_aliased_cache = platform
--- 1216,1220 ----
              bits,linkage = architecture(sys.executable)
              platform = _platform(system,release,machine,processor,bits,linkage)
! 
      if aliased:
          _platform_aliased_cache = platform
***************
*** 1229,1233 ****
  if __name__ == '__main__':
      # Default is to print the aliased verbose platform string
!     terse = ('terse' in sys.argv or '--terse' in sys.argv) 
      aliased = (not 'nonaliased' in sys.argv and not '--nonaliased' in sys.argv)
      print platform(aliased,terse)
--- 1229,1233 ----
  if __name__ == '__main__':
      # Default is to print the aliased verbose platform string
!     terse = ('terse' in sys.argv or '--terse' in sys.argv)
      aliased = (not 'nonaliased' in sys.argv and not '--nonaliased' in sys.argv)
      print platform(aliased,terse)

Index: sgmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** sgmllib.py	30 Mar 2003 14:25:39 -0000	1.43
--- sgmllib.py	24 Apr 2003 16:02:42 -0000	1.44
***************
*** 145,152 ****
                      continue
                  if rawdata.startswith("<!--", i):
!                 	# Strictly speaking, a comment is --.*-- 
!                 	# within a declaration tag <!...>.
!                 	# This should be removed, 
!                 	# and comments handled only in parse_declaration.
                      k = self.parse_comment(i)
                      if k < 0: break
--- 145,152 ----
                      continue
                  if rawdata.startswith("<!--", i):
!                         # Strictly speaking, a comment is --.*--
!                         # within a declaration tag <!...>.
!                         # This should be removed,
!                         # and comments handled only in parse_declaration.
                      k = self.parse_comment(i)
                      if k < 0: break

Index: shelve.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shelve.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** shelve.py	19 Apr 2003 20:59:02 -0000	1.21
--- shelve.py	24 Apr 2003 16:02:43 -0000	1.22
***************
*** 16,20 ****
          d[key] = data   # store data at key (overwrites old data if
                          # using an existing key)
!         data = d[key]   # retrieve a COPY of the data at key (raise 
                          # KeyError if no such key) -- NOTE that this
                          # access returns a *copy* of the entry!
--- 16,20 ----
          d[key] = data   # store data at key (overwrites old data if
                          # using an existing key)
!         data = d[key]   # retrieve a COPY of the data at key (raise
                          # KeyError if no such key) -- NOTE that this
                          # access returns a *copy* of the entry!

Index: stringprep.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/stringprep.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** stringprep.py	18 Apr 2003 10:39:51 -0000	1.1
--- stringprep.py	24 Apr 2003 16:02:43 -0000	1.2
***************
*** 271,273 ****
  def in_table_d2(code):
      return unicodedata.bidirectional(code) == "L"
- 
--- 271,272 ----

Index: trace.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/trace.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** trace.py	22 Apr 2003 15:35:51 -0000	1.6
--- trace.py	24 Apr 2003 16:02:43 -0000	1.7
***************
*** 269,273 ****
              n_hits, n_lines = self.write_results_file(coverpath, source,
                                                        lnotab, count)
!             
              if summary and n_lines:
                  percent = int(100 * n_hits / n_lines)
--- 269,273 ----
              n_hits, n_lines = self.write_results_file(coverpath, source,
                                                        lnotab, count)
! 
              if summary and n_lines:
                  percent = int(100 * n_hits / n_lines)
***************
*** 468,472 ****
      def globaltrace_countfuncs(self, frame, why, arg):
          """Handler for call events.
!         
          Adds (filename, modulename, funcname) to the self._calledfuncs dict.
          """
--- 468,472 ----
      def globaltrace_countfuncs(self, frame, why, arg):
          """Handler for call events.
! 
          Adds (filename, modulename, funcname) to the self._calledfuncs dict.
          """