1. 26 Sep, 2001 23 commits
    • Tim Peters's avatar
      Display a class's method resolution order, if it's non-trivial. "Trivial" · c86f6ca2
      Tim Peters authored
      here means it has no more than one base class to rummage through (in which
      cases there's no potential confusion about resolution order).
      c86f6ca2
    • Fred Drake's avatar
      More test cases, including something that simulates what the profiler · 39cd603f
      Fred Drake authored
      probably *should* be doing.
      39cd603f
    • Tim Peters's avatar
      A file just to look at (using pydoc). · 38a50f90
      Tim Peters authored
      38a50f90
    • Jeremy Hylton's avatar
      Add tests for new PyErr_NormalizeException() behavior · ede049b2
      Jeremy Hylton authored
      Add raise_exception() to the _testcapi module.  It isn't a test, but
      the C API exists only to support test_exceptions.  raise_exception()
      takes two arguments -- an exception class and an integer specifying
      how many arguments it should be called with.
      
      test_exceptions uses BadException() to test the interpreter's behavior
      when there is a problem instantiating the exception.  test_capi1()
      calls it with too many arguments.  test_capi2() causes an exception to
      be raised in the Python code of the constructor.
      ede049b2
    • Jeremy Hylton's avatar
      PyErr_NormalizeException() · e2e2c9f4
      Jeremy Hylton authored
      If a new exception occurs while an exception instance is being
      created, try harder to make sure there is a traceback.  If the
      original exception had a traceback associated with it and the new
      exception does not, keep the old exception.
      
      Of course, callers to PyErr_NormalizeException() must still be
      prepared to have tb set to NULL.
      
      XXX This isn't an ideal solution, but it's better than no traceback at
      all.  It occurs if, for example, the exception occurs when the call to
      the constructor fails before any Python code is executed.  Guido
      suggests that it there is Python code that was about to be executed
      -- but wasn't, say, because it was called with the wrong number of
      arguments -- then we should point at the first line of the code object
      anyway.
      e2e2c9f4
    • Jeremy Hylton's avatar
      Don't export generators future info · 4f38c1e6
      Jeremy Hylton authored
      4f38c1e6
    • Jeremy Hylton's avatar
      Prevent a NULL pointer from being pushed onto the stack. · c6314892
      Jeremy Hylton authored
      It's possible for PyErr_NormalizeException() to set the traceback
      pointer to NULL.  I'm not sure how to provoke this directly from
      Python, although it may be possible.  The error occurs when an
      exception is set using PyErr_SetObject() and another exception occurs
      while PyErr_NormalizeException() is creating the exception instance.
      
      XXX As a result of this change, it's possible for an exception to
      occur but sys.last_traceback to be left undefined.  Not sure if this
      is a problem.
      c6314892
    • Fred Drake's avatar
      Move the styling for the HTML version of \mailheader into the CSS file. · 479384e1
      Fred Drake authored
      In both the HTML and typeset versions of the documentation, add a colon
      after the name of a mail header so that it is more easily distinguished
      from other text.
      479384e1
    • Fred Drake's avatar
      Note that the colon following a mail header name should not be included · 203d91a4
      Fred Drake authored
      when using the \mailheader markup.
      Change a couple of inline examples to show the markup rather than the
      result.
      203d91a4
    • Greg Ward's avatar
      Typo fix. · e22871e9
      Greg Ward authored
      e22871e9
    • Fred Drake's avatar
      Move the \mailheader description to the right place. · 8b3a7b58
      Fred Drake authored
      Clarify the \mimetype description; it can be used to refer to a part of a
      MIME type name, so \mimetype{text} or \mimetype{plain} can be used, not
      just \mimetype{text/plain}.
      8b3a7b58
    • Fred Drake's avatar
      Start making some markup adjustments; Barry has indicated he will work on · a6a885b6
      Fred Drake authored
      this before we finish the integration, along with some restructuring.
      a6a885b6
    • Thomas Wouters's avatar
      Test case for SF bugs #463359 and #462937, added to test_grammar for lack of · 80d373cb
      Thomas Wouters authored
      a better place. Excessively fragile code, but at least it breaks when
      something in this area changes!
      80d373cb
    • Barry Warsaw's avatar
      Update the tests for the current incarnation of the email package, and · 65279d02
      Barry Warsaw authored
      added some new tests of message/delivery-status content type messages.
      65279d02
    • 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 17 commits