[Python-checkins] python/dist/src/Lib ConfigParser.py,1.38.10.6,1.38.10.7 StringIO.py,1.19.12.3,1.19.12.4 fileinput.py,1.8.8.1,1.8.8.2 httplib.py,1.42.10.8,1.42.10.9 smtplib.py,1.46.4.5,1.46.4.6 tabnanny.py,1.16.16.1,1.16.16.2 tokenize.py,1.28.14.1,1.28.14.2 urllib2.py,1.24.8.2,1.24.8.3

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Sun, 06 Oct 2002 18:18:19 -0700


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

Modified Files:
      Tag: release22-maint
	ConfigParser.py StringIO.py fileinput.py httplib.py smtplib.py 
	tabnanny.py tokenize.py urllib2.py 
Log Message:
Whitespace normalization.


Index: ConfigParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v
retrieving revision 1.38.10.6
retrieving revision 1.38.10.7
diff -C2 -d -r1.38.10.6 -r1.38.10.7
*** ConfigParser.py	3 Oct 2002 15:27:47 -0000	1.38.10.6
--- ConfigParser.py	7 Oct 2002 01:18:17 -0000	1.38.10.7
***************
*** 283,287 ****
          # do the string interpolation
          value = rawval
!         depth = MAX_INTERPOLATION_DEPTH 
          while depth:                    # Loop through this until it's done
              depth -= 1
--- 283,287 ----
          # do the string interpolation
          value = rawval
!         depth = MAX_INTERPOLATION_DEPTH
          while depth:                    # Loop through this until it's done
              depth -= 1

Index: StringIO.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/StringIO.py,v
retrieving revision 1.19.12.3
retrieving revision 1.19.12.4
diff -C2 -d -r1.19.12.3 -r1.19.12.4
*** StringIO.py	15 May 2002 03:50:31 -0000	1.19.12.3
--- StringIO.py	7 Oct 2002 01:18:17 -0000	1.19.12.4
***************
*** 38,51 ****
  
  class StringIO:
!     """class StringIO([buffer]) 
!     
      When a StringIO object is created, it can be initialized to an existing
      string by passing the string to the constructor. If no string is given,
!     the StringIO will start empty. 
  
      The StringIO object can accept either Unicode or 8-bit strings, but
      mixing the two may take some care. If both are used, 8-bit strings that
      cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause
!     a UnicodeError to be raised when getvalue() is called. 
      """
      def __init__(self, buf = ''):
--- 38,51 ----
  
  class StringIO:
!     """class StringIO([buffer])
! 
      When a StringIO object is created, it can be initialized to an existing
      string by passing the string to the constructor. If no string is given,
!     the StringIO will start empty.
  
      The StringIO object can accept either Unicode or 8-bit strings, but
      mixing the two may take some care. If both are used, 8-bit strings that
      cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause
!     a UnicodeError to be raised when getvalue() is called.
      """
      def __init__(self, buf = ''):
***************
*** 186,190 ****
          strings that cannot be interpreted as 7-bit ASCII (that use the
          8th bit) will cause a UnicodeError to be raised when getvalue()
!         is called. 
          """
          if self.buflist:
--- 186,190 ----
          strings that cannot be interpreted as 7-bit ASCII (that use the
          8th bit) will cause a UnicodeError to be raised when getvalue()
!         is called.
          """
          if self.buflist:

Index: fileinput.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/fileinput.py,v
retrieving revision 1.8.8.1
retrieving revision 1.8.8.2
diff -C2 -d -r1.8.8.1 -r1.8.8.2
*** fileinput.py	15 May 2002 03:50:31 -0000	1.8.8.1
--- fileinput.py	7 Oct 2002 01:18:17 -0000	1.8.8.2
***************
*** 95,99 ****
      as global state for the functions of this module, and is also returned
      to use during iteration. The parameters to this function will be passed
!     along to the constructor of the FileInput class. 
      """
      global _state
--- 95,99 ----
      as global state for the functions of this module, and is also returned
      to use during iteration. The parameters to this function will be passed
!     along to the constructor of the FileInput class.
      """
      global _state
***************
*** 119,123 ****
      Before the first line has been read, this function has no effect;
      it cannot be used to skip the first file. After the last line of the
!     last file has been read, this function has no effect. 
      """
      if not _state:
--- 119,123 ----
      Before the first line has been read, this function has no effect;
      it cannot be used to skip the first file. After the last line of the
!     last file has been read, this function has no effect.
      """
      if not _state:
***************
*** 128,132 ****
      """
      Return the name of the file currently being read.
!     Before the first line has been read, returns None. 
      """
      if not _state:
--- 128,132 ----
      """
      Return the name of the file currently being read.
!     Before the first line has been read, returns None.
      """
      if not _state:
***************
*** 138,142 ****
      Return the cumulative line number of the line that has just been read.
      Before the first line has been read, returns 0. After the last line
!     of the last file has been read, returns the line number of that line. 
      """
      if not _state:
--- 138,142 ----
      Return the cumulative line number of the line that has just been read.
      Before the first line has been read, returns 0. After the last line
!     of the last file has been read, returns the line number of that line.
      """
      if not _state:
***************
*** 148,152 ****
      Return the line number in the current file. Before the first line
      has been read, returns 0. After the last line of the last file has
!     been read, returns the line number of that line within the file. 
      """
      if not _state:
--- 148,152 ----
      Return the line number in the current file. Before the first line
      has been read, returns 0. After the last line of the last file has
!     been read, returns the line number of that line within the file.
      """
      if not _state:
***************
*** 157,161 ****
      """
      Returns true the line just read is the first line of its file,
!     otherwise returns false. 
      """
      if not _state:
--- 157,161 ----
      """
      Returns true the line just read is the first line of its file,
!     otherwise returns false.
      """
      if not _state:
***************
*** 166,170 ****
      """
      Returns true if the last line was read from sys.stdin,
!     otherwise returns false. 
      """
      if not _state:
--- 166,170 ----
      """
      Returns true if the last line was read from sys.stdin,
!     otherwise returns false.
      """
      if not _state:
***************
*** 174,178 ****
  class FileInput:
      """class FileInput([files[, inplace[, backup]]])
!     
      Class FileInput is the implementation of the module; its methods
      filename(), lineno(), fileline(), isfirstline(), isstdin(), nextfile()
--- 174,178 ----
  class FileInput:
      """class FileInput([files[, inplace[, backup]]])
! 
      Class FileInput is the implementation of the module; its methods
      filename(), lineno(), fileline(), isfirstline(), isstdin(), nextfile()
***************
*** 181,185 ****
      input line, and a __getitem__() method which implements the
      sequence behavior. The sequence must be accessed in strictly
!     sequential order; random access and readline() cannot be mixed. 
      """
  
--- 181,185 ----
      input line, and a __getitem__() method which implements the
      sequence behavior. The sequence must be accessed in strictly
!     sequential order; random access and readline() cannot be mixed.
      """
  

Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.42.10.8
retrieving revision 1.42.10.9
diff -C2 -d -r1.42.10.8 -r1.42.10.9
*** httplib.py	25 Sep 2002 16:53:17 -0000	1.42.10.8
--- httplib.py	7 Oct 2002 01:18:17 -0000	1.42.10.9
***************
*** 372,376 ****
          if self.chunked:
              return self._read_chunked(amt)
!         
          if amt is None:
              # unbounded read
--- 372,376 ----
          if self.chunked:
              return self._read_chunked(amt)
! 
          if amt is None:
              # unbounded read
***************
*** 442,446 ****
  
          return value
!     
      def _safe_read(self, amt):
          """Read the number of bytes requested, compensating for partial reads.
--- 442,446 ----
  
          return value
! 
      def _safe_read(self, amt):
          """Read the number of bytes requested, compensating for partial reads.

Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.46.4.5
retrieving revision 1.46.4.6
diff -C2 -d -r1.46.4.5 -r1.46.4.6
*** smtplib.py	6 Oct 2002 17:51:10 -0000	1.46.4.5
--- smtplib.py	7 Oct 2002 01:18:17 -0000	1.46.4.6
***************
*** 409,413 ****
                          + " " + auth_match.groups(0)[0]
                  continue
!  
              # RFC 1869 requires a space between ehlo keyword and parameters.
              # It's actually stricter, in that only spaces are allowed between
--- 409,413 ----
                          + " " + auth_match.groups(0)[0]
                  continue
! 
              # RFC 1869 requires a space between ehlo keyword and parameters.
              # It's actually stricter, in that only spaces are allowed between
***************
*** 525,529 ****
          def encode_plain(user, password):
              return encode_base64("%s\0%s\0%s" % (user, user, password), eol="")
!  
  
          AUTH_PLAIN = "PLAIN"
--- 525,529 ----
          def encode_plain(user, password):
              return encode_base64("%s\0%s\0%s" % (user, user, password), eol="")
! 
  
          AUTH_PLAIN = "PLAIN"

Index: tabnanny.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tabnanny.py,v
retrieving revision 1.16.16.1
retrieving revision 1.16.16.2
diff -C2 -d -r1.16.16.1 -r1.16.16.2
*** tabnanny.py	15 May 2002 03:50:31 -0000	1.16.16.1
--- tabnanny.py	7 Oct 2002 01:18:17 -0000	1.16.16.2
***************
*** 3,14 ****
  """The Tab Nanny despises ambiguous indentation.  She knows no mercy.
  
! tabnanny -- Detection of ambiguous indentation 
  
  For the time being this module is intended to be called as a script.
  However it is possible to import it into an IDE and use the function
! check() described below. 
  
  Warning: The API provided by this module is likely to change in future
! releases; such changes may not be backward compatible. 
  """
  
--- 3,14 ----
  """The Tab Nanny despises ambiguous indentation.  She knows no mercy.
  
! tabnanny -- Detection of ambiguous indentation
  
  For the time being this module is intended to be called as a script.
  However it is possible to import it into an IDE and use the function
! check() described below.
  
  Warning: The API provided by this module is likely to change in future
! releases; such changes may not be backward compatible.
  """
  
***************
*** 74,85 ****
  def check(file):
      """check(file_or_dir)
!     
      If file_or_dir is a directory and not a symbolic link, then recursively
      descend the directory tree named by file_or_dir, checking all .py files
      along the way. If file_or_dir is an ordinary Python source file, it is
      checked for whitespace related problems. The diagnostic messages are
!     written to standard output using the print statement.     
      """
!     
      if os.path.isdir(file) and not os.path.islink(file):
          if verbose:
--- 74,85 ----
  def check(file):
      """check(file_or_dir)
! 
      If file_or_dir is a directory and not a symbolic link, then recursively
      descend the directory tree named by file_or_dir, checking all .py files
      along the way. If file_or_dir is an ordinary Python source file, it is
      checked for whitespace related problems. The diagnostic messages are
!     written to standard output using the print statement.
      """
! 
      if os.path.isdir(file) and not os.path.islink(file):
          if verbose:

Index: tokenize.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tokenize.py,v
retrieving revision 1.28.14.1
retrieving revision 1.28.14.2
diff -C2 -d -r1.28.14.1 -r1.28.14.2
*** tokenize.py	15 May 2002 03:50:31 -0000	1.28.14.1
--- tokenize.py	7 Oct 2002 01:18:17 -0000	1.28.14.2
***************
*** 126,137 ****
      The tokenize() function accepts two parameters: one representing the
      input stream, and one providing an output mechanism for tokenize().
!     
      The first parameter, readline, must be a callable object which provides
      the same interface as the readline() method of built-in file objects.
!     Each call to the function should return one line of input as a string. 
  
      The second parameter, tokeneater, must also be a callable object. It is
      called once for each token, with five arguments, corresponding to the
!     tuples generated by generate_tokens(). 
      """
      try:
--- 126,137 ----
      The tokenize() function accepts two parameters: one representing the
      input stream, and one providing an output mechanism for tokenize().
! 
      The first parameter, readline, must be a callable object which provides
      the same interface as the readline() method of built-in file objects.
!     Each call to the function should return one line of input as a string.
  
      The second parameter, tokeneater, must also be a callable object. It is
      called once for each token, with five arguments, corresponding to the
!     tuples generated by generate_tokens().
      """
      try:
***************
*** 151,155 ****
      readline() method of built-in file objects. Each call to the function
      should return one line of input as a string.
!     
      The generator produces 5-tuples with these members: the token type; the
      token string; a 2-tuple (srow, scol) of ints specifying the row and
--- 151,155 ----
      readline() method of built-in file objects. Each call to the function
      should return one line of input as a string.
! 
      The generator produces 5-tuples with these members: the token type; the
      token string; a 2-tuple (srow, scol) of ints specifying the row and
***************
*** 157,161 ****
      ints specifying the row and column where the token ends in the source;
      and the line on which the token was found. The line passed is the
!     logical line; continuation lines are included. 
      """
      lnum = parenlev = continued = 0
--- 157,161 ----
      ints specifying the row and column where the token ends in the source;
      and the line on which the token was found. The line passed is the
!     logical line; continuation lines are included.
      """
      lnum = parenlev = continued = 0

Index: urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v
retrieving revision 1.24.8.2
retrieving revision 1.24.8.3
diff -C2 -d -r1.24.8.2 -r1.24.8.3
*** urllib2.py	25 Sep 2002 10:32:49 -0000	1.24.8.2
--- urllib2.py	7 Oct 2002 01:18:17 -0000	1.24.8.3
***************
*** 459,463 ****
              if ':' in user_pass:
                  user, password = user_pass.split(':', 1)
!                 user_pass = base64.encodestring('%s:%s' % (unquote(user), 
                                                             unquote(password)))
                  req.add_header('Proxy-Authorization', 'Basic ' + user_pass)
--- 459,463 ----
              if ':' in user_pass:
                  user, password = user_pass.split(':', 1)
!                 user_pass = base64.encodestring('%s:%s' % (unquote(user),
                                                             unquote(password)))
                  req.add_header('Proxy-Authorization', 'Basic ' + user_pass)