[Python-checkins] python/dist/src/Lib/email Charset.py,1.12,1.13

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Wed, 05 Mar 2003 21:16:31 -0800


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

Modified Files:
	Charset.py 
Log Message:
Merge of the folding-reimpl-branch.  Specific changes,

Charset: Alias __repr__ to __str__ for debugging.

header_encode(): When calling quopriMIME.header_encode(), set
maxlinelen=None so that the lower level function doesn't (also) try to
wrap/fold the line.


Index: Charset.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Charset.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Charset.py	7 Jan 2003 00:29:07 -0000	1.12
--- Charset.py	6 Mar 2003 05:16:29 -0000	1.13
***************
*** 235,238 ****
--- 235,240 ----
          return self.input_charset.lower()
  
+     __repr__ = __str__
+ 
      def __eq__(self, other):
          return str(self) == str(other).lower()
***************
*** 359,363 ****
              return email.base64MIME.header_encode(s, cset)
          elif self.header_encoding == QP:
!             return email.quopriMIME.header_encode(s, cset)
          elif self.header_encoding == SHORTEST:
              lenb64 = email.base64MIME.base64_len(s)
--- 361,365 ----
              return email.base64MIME.header_encode(s, cset)
          elif self.header_encoding == QP:
!             return email.quopriMIME.header_encode(s, cset, maxlinelen=None)
          elif self.header_encoding == SHORTEST:
              lenb64 = email.base64MIME.base64_len(s)
***************
*** 366,370 ****
                  return email.base64MIME.header_encode(s, cset)
              else:
!                 return email.quopriMIME.header_encode(s, cset)
          else:
              return s
--- 368,372 ----
                  return email.base64MIME.header_encode(s, cset)
              else:
!                 return email.quopriMIME.header_encode(s, cset, maxlinelen=None)
          else:
              return s