[Python-checkins] python/dist/src/Lib/email MIMEAudio.py,1.2,1.3 MIMEBase.py,1.5,1.6 MIMEImage.py,1.4,1.5 MIMEText.py,1.4,1.5

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Sun, 02 Jun 2002 12:04:42 -0700


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

Modified Files:
	MIMEAudio.py MIMEBase.py MIMEImage.py MIMEText.py 
Log Message:
Use absolute import paths for intrapackage imports.

Use MIMENonMultipart as the base class so that you can't attach() to
these non-multipart message types.


Index: MIMEAudio.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/MIMEAudio.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MIMEAudio.py	24 Nov 2001 15:49:53 -0000	1.2
--- MIMEAudio.py	2 Jun 2002 19:04:39 -0000	1.3
***************
*** 7,13 ****
  from cStringIO import StringIO
  
! import MIMEBase
! import Errors
! import Encoders
  
  
--- 7,13 ----
  from cStringIO import StringIO
  
! from email import Errors
! from email import Encoders
! from email.MIMENonMultipart import MIMENonMultipart
  
  
***************
*** 38,42 ****
  
  
! class MIMEAudio(MIMEBase.MIMEBase):
      """Class for generating audio/* MIME documents."""
  
--- 38,42 ----
  
  
! class MIMEAudio(MIMENonMultipart):
      """Class for generating audio/* MIME documents."""
  
***************
*** 67,71 ****
          if _subtype is None:
              raise TypeError, 'Could not find audio MIME subtype'
!         MIMEBase.MIMEBase.__init__(self, 'audio', _subtype, **_params)
          self.set_payload(_audiodata)
          _encoder(self)
--- 67,71 ----
          if _subtype is None:
              raise TypeError, 'Could not find audio MIME subtype'
!         MIMENonMultipart.__init__(self, 'audio', _subtype, **_params)
          self.set_payload(_audiodata)
          _encoder(self)

Index: MIMEBase.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/MIMEBase.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MIMEBase.py	10 Apr 2002 21:01:30 -0000	1.5
--- MIMEBase.py	2 Jun 2002 19:04:39 -0000	1.6
***************
*** 5,9 ****
  """
  
! import Message
  
  
--- 5,9 ----
  """
  
! from email import Message
  
  

Index: MIMEImage.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/MIMEImage.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MIMEImage.py	10 Apr 2002 21:01:30 -0000	1.4
--- MIMEImage.py	2 Jun 2002 19:04:39 -0000	1.5
***************
*** 7,18 ****
  import imghdr
  
! # Intrapackage imports
! import MIMEBase
! import Errors
! import Encoders
  
  
  
! class MIMEImage(MIMEBase.MIMEBase):
      """Class for generating image/* type MIME documents."""
  
--- 7,17 ----
  import imghdr
  
! from email import Errors
! from email import Encoders
! from email.MIMENonMultipart import MIMENonMultipart
  
  
  
! class MIMEImage(MIMENonMultipart):
      """Class for generating image/* type MIME documents."""
  
***************
*** 42,46 ****
          if _subtype is None:
              raise TypeError, 'Could not guess image MIME subtype'
!         MIMEBase.MIMEBase.__init__(self, 'image', _subtype, **_params)
          self.set_payload(_imagedata)
          _encoder(self)
--- 41,45 ----
          if _subtype is None:
              raise TypeError, 'Could not guess image MIME subtype'
!         MIMENonMultipart.__init__(self, 'image', _subtype, **_params)
          self.set_payload(_imagedata)
          _encoder(self)

Index: MIMEText.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/MIMEText.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MIMEText.py	10 Apr 2002 21:01:30 -0000	1.4
--- MIMEText.py	2 Jun 2002 19:04:39 -0000	1.5
***************
*** 6,15 ****
  
  import warnings
! import MIMEBase
! from Encoders import encode_7or8bit
  
  
  
! class MIMEText(MIMEBase.MIMEBase):
      """Class for generating text/* type MIME documents."""
  
--- 6,15 ----
  
  import warnings
! from email.MIMENonMultipart import MIMENonMultipart
! from email.Encoders import encode_7or8bit
  
  
  
! class MIMEText(MIMENonMultipart):
      """Class for generating text/* type MIME documents."""
  
***************
*** 34,39 ****
          not what you want.
          """
!         MIMEBase.MIMEBase.__init__(self, 'text', _subtype,
!                                    **{'charset': _charset})
          if _text and _text[-1] <> '\n':
              _text += '\n'
--- 34,39 ----
          not what you want.
          """
!         MIMENonMultipart.__init__(self, 'text', _subtype,
!                                   **{'charset': _charset})
          if _text and _text[-1] <> '\n':
              _text += '\n'