1. 26 Sep, 2001 9 commits
    • Barry Warsaw's avatar
      More test messages for test_email.py · 0e416cd8
      Barry Warsaw authored
      0e416cd8
    • Barry Warsaw's avatar
      _parsebody(): Use get_boundary() and get_type(). · 66971fbc
      Barry Warsaw authored
          Also, add a clause to the big-if to handle message/delivery-status
          content types.  These create a message with subparts that are
          Message instances, which best represent the header blocks of this
          content type.
      66971fbc
    • Barry Warsaw's avatar
      has_key(): Implement in terms of get(). · beb5945c
      Barry Warsaw authored
      get_type(): Use a compiled regular expression, which can be shared.
      
      _get_params_preserve(): A helper method which extracts the header's
          parameter list preserving value quoting.  I'm not sure that this
          needs to be a public method.  It's necessary because we want
          get_param() and friends to return the unquoted parameter value,
          however we want the quote-preserved form for set_boundary().
      
      get_params(), get_param(), set_boundary(): Implement in terms of
          _get_params_preserve().
      
      walk(): Yield ourself first, then recurse over our subparts (if any).
      beb5945c
    • Barry Warsaw's avatar
      __init__(): Arguments major renamed to maintype and minor renamed to · 76fac8ed
      Barry Warsaw authored
          subtype for consistency with the rest of the package.
      76fac8ed
    • Barry Warsaw's avatar
      Updated docstrings. Also, · 57758e3a
      Barry Warsaw authored
      typed_subpart_iterator(): Arguments major renamed to maintype and
          minor renamed to subtype for consistency with the rest of the
          package.
      57758e3a
    • Barry Warsaw's avatar
      Image.py and class Image => MIMEImage.py and MIMEImage · 3dd978df
      Barry Warsaw authored
      Text.py and class Text => MIMEText.py and MIMEText
      
      MessageRFC822.py and class MessageRFC822 => MIMEMessage.py and MIMEMessage
      
      These are renamed so as to be more consistent; these are MIME specific
      derived classes for when creating the object model out of whole cloth.
      3dd978df
    • Barry Warsaw's avatar
      In class Generator: · b384e017
      Barry Warsaw authored
          _handle_text(): If the payload is None, then just return (i.e. don't
      	write anything).  Subparts of message/delivery-status types
      	will have this property since they are just blocks of headers.
      
      	Also, when raising the TypeError, include the type of the
      	payload in the error message.
      
          _handle_multipart(), _handle_message(): When creating a clone of self,
      	pass in our _mangle_from_ and maxheaderlen flags so the clone
      	has the same behavior.
      
          _handle_message_delivery_status(): New method to do the proper
      	printing of message/delivery-status type messages.  These have
      	to be handled differently than other message/* types because
      	their payloads are subparts containing just blocks of headers.
      
      In class DecodedGenerator:
      
          _dispatch(): Skip over multipart/* messages since we don't care
              about them, and don't want the non-text format to appear in
              the printed results.
      b384e017
    • Barry Warsaw's avatar
      cosmetic · 6f70c419
      Barry Warsaw authored
      6f70c419
    • Barry Warsaw's avatar
      The email package documentation, currently organized the way I think · 5e634638
      Barry Warsaw authored
      Fred prefers.  I'm not sure I like this organization, so it may change.
      5e634638
  2. 25 Sep, 2001 25 commits
  3. 24 Sep, 2001 6 commits
    • Tim Peters's avatar
      + Text-mode (but not yet GUI mode) pydoc now produces useful stuff for · f4aad8eb
      Tim Peters authored
        properties:  the docstring (if any) is displayed, and the getter, setter
        and deleter (if any) functions are named.  All that is shown indented
        after the property name.
      
      + Text-mode pydoc class display now draws a horizontal line between
        class attribute groups (similar to GUI mode -- while visually more
        intrusive in text mode, it's still an improvement).
      f4aad8eb
    • Tim Peters's avatar
      Make properties discoverable from Python: · 66c1a525
      Tim Peters authored
      - property() now takes 4 keyword arguments:  fget, fset, fdel, doc.
        Note that the real purpose of the 'f' prefix is to make fdel fit in
        ('del' is a keyword, so can't used as a keyword argument name).
      
      - These map to visible readonly attributes 'fget', 'fset', 'fdel',
        and '__doc__' in the property object.
      
      - fget/fset/fdel weren't discoverable from Python before.
      
      - __doc__ is new, and allows to associate a docstring with a property.
      66c1a525
    • Fred Drake's avatar
      Added several new tests to check the behavior with respect to doctype · 30c48491
      Fred Drake authored
      declarations and weird markup that we used to accept & ignore that recent
      versions raised an exception for; the original behavior has been restored
      and augmented (the user can decide what to do if they care; the default is
      to ignore it as done in early versions).
      30c48491
    • Fred Drake's avatar
      Adapt to use the test_main() approach. · e822049e
      Fred Drake authored
      e822049e
    • Fred Drake's avatar
      Re-factor the SGMLParser class to use the new markupbase.ParserBase class. · a3bae336
      Fred Drake authored
      Use a new internal method, error(), consistently to raise parse errors;
      the new base class also uses this.
      Adjust the parse_comment() method to return the new offset into the buffer
      instead of the number of characters scanned; this was the only helper
      method that did it this way, so we have better consistency now.  Required
      to share the new base class.
      This fixes SF bug #448482 and #453706.
      a3bae336
    • Fred Drake's avatar
      Re-factor the HTMLParser class to use the new markupbase.ParserBase class. · bfc8fea1
      Fred Drake authored
      Use a new internal method, error(), consistently to raise parse errors;
      the new base class also uses this.
      bfc8fea1