1. 14 Sep, 2001 12 commits
    • Jeremy Hylton's avatar
      Supply code objects a new-style tp_members slot and tp_getattr impl. · c785f484
      Jeremy Hylton authored
      The chief effects are to make dir() do something useful and supply
      them with an __class__.
      c785f484
    • Guido van Rossum's avatar
      tp_new_wrapper(): A subtle change in the check for safe use. · a8c60f47
      Guido van Rossum authored
      Allow staticbase != type, as long as their tp_new slots are the same.
      a8c60f47
    • Guido van Rossum's avatar
      Add call_maybe(): a variant of call_method() that returns · f21c6be7
      Guido van Rossum authored
      NotImplemented when the lookup fails, and use this for binary
      operators.  Also lookup_maybe() which doesn't raise an exception when
      the lookup fails (still returning NULL).
      f21c6be7
    • Fred Drake's avatar
      Markup adjustments for consistency. · f2a5f3f7
      Fred Drake authored
      f2a5f3f7
    • Guido van Rossum's avatar
      call_method(): · 717ce00c
      Guido van Rossum authored
      - Don't turn a non-tuple argument into a one-tuple.  Rather, the
        caller must pass a format that causes Py_VaBuildValue() to return a
        tuple.
      
      - Speed things up by calling PyObject_Call (which is fairly low-level
        and straightforward) rather than PyObject_CallObject (which calls
        PyEval_CallObjectWithKeywords which calls PyObject_Call, and nothing
        is really done in the mean time except some tests for NULL args and
        valid types, which are already guaranteed).
      
      - Cosmetics.
      
      Other places:
      
      - Make sure that the format argument to call_method() is surrounded by
        parentheses, so it will cause a tuple to be created.
      
      - Replace a few calls to PyEval_CallObject() with a surefire tuple for
        args to calls to PyObject_Call().  (A few calls to
        PyEval_CallObject() remain that have NULL for args.)
      717ce00c
    • Guido van Rossum's avatar
      PyObject_CallObject(): this may as well call PyEval_CallObject() · 5560b749
      Guido van Rossum authored
      directly, as the only thing done here (replace NULL args with an empty
      tuple) is also done there.
      
      XXX Maybe we should take one step further and equate the two at the
      macro level?  That's harder though because PyEval_Call* is declared in
      a header that's not included standard.  But it is silly that
      PyObject_CallObject calls PyEval_CallObject which calls back to
      PyObject_Call.  Maybe PyEval_CallObject should be moved into this file
      instead?  All I know is that there are too many call APIs!  The
      differences between PyObject_Call and PyEval_CallObjectWithKeywords is
      that the latter allows args to be NULL, and does explicit type checks
      for args and kwds.
      5560b749
    • Guido van Rossum's avatar
      Mention SMTP additions and hmac module. · d8185ca4
      Guido van Rossum authored
      d8185ca4
    • Andrew M. Kuchling's avatar
      Add support for SMTP TLS · 1efd7ad8
      Andrew M. Kuchling authored
      1efd7ad8
    • Guido van Rossum's avatar
      SF patch #461413 (Gerhard Häring): Add STARTTLS feature to smtplib · f7fcf5ee
      Guido van Rossum authored
         This patch adds the features from RFC 2487 (Secure SMTP
         over TLS) to the smtplib module:
      
         - A starttls() function
         - Wrapper classes that simulate enough of sockets and
           files for smtplib, but really wrap a SSLObject
         - reset the list of known SMTP extensions at each call
           of ehlo(). This should have been the case anyway.
      f7fcf5ee
    • Guido van Rossum's avatar
      _PyObject_Dump(): print the type of the object. This is by far the · 5f5512d2
      Guido van Rossum authored
      most frequently interesting information IMO.  Also tidy up the output.
      5f5512d2
    • Tim Peters's avatar
      The end of [#460467] file objects should be subclassable. · 4441001b
      Tim Peters authored
      A surprising number of changes to split tp_new into tp_new and tp_init.
      Turned out the older PyFile_FromFile() didn't initialize the memory it
      allocated in all (error) cases, which caused new sanity asserts
      elsewhere to fail left & right (and could have, e.g., caused file_dealloc
      to try decrefing random addresses).
      4441001b
    • Tim Peters's avatar
      Changed the dict implementation to take "string shortcuts" only when · 0ab085c4
      Tim Peters authored
      keys are true strings -- no subclasses need apply.  This may be debatable.
      
      The problem is that a str subclass may very well want to override __eq__
      and/or __hash__ (see the new example of case-insensitive strings in
      test_descr), but go-fast shortcuts for strings are ubiquitous in our dicts
      (and subclass overrides aren't even looked for then).  Another go-fast
      reason for the change is that PyCheck_StringExact() is a quicker test
      than PyCheck_String(), and we make such a test on virtually every access
      to every dict.
      
      OTOH, a str subclass may also be perfectly happy using the base str eq
      and hash, and this change slows them a lot.  But those cases are still
      hypothetical, while Python's own reliance on true-string dicts is not.
      0ab085c4
  2. 13 Sep, 2001 11 commits
  3. 12 Sep, 2001 10 commits
  4. 11 Sep, 2001 7 commits