1. 18 Jan, 2001 28 commits
  2. 17 Jan, 2001 12 commits
    • Guido van Rossum's avatar
      Fix a leak in instance_coerce(). This was introduced by Neil's · 24f67d56
      Guido van Rossum authored
      earlier coercion changes, not by rich comparisons.  When a coercion
      function returns 1 (meaning it cannot do it), it should not INCREF the
      arguments.  When no __coerce__() method was found, instance_coerce()
      originally returned 0, pretending it did it.  Neil changed the return
      value to 1, more accurately reflecting that it didn't do anything, but
      forgot to take out the two INCREF calls.
      24f67d56
    • Tim Peters's avatar
      Windows: 2.1a1 changes so Python runs again. Note that the python20 · 97c9640c
      Tim Peters authored
      subproject is gone, replaced by the new pythoncore subproject.
      97c9640c
    • Andrew M. Kuchling's avatar
      The signal module has to be compiled statically, so add it to Setup.dist · 6425efe9
      Andrew M. Kuchling authored
          and remove support for it from setup.py
      6425efe9
    • Guido van Rossum's avatar
      Convert to rich comparisons: · 65e1cea6
      Guido van Rossum authored
      - sort's docompare() calls RichCompare(Py_LT).
      
      - list_contains(), list_index(), listcount(), listremove() call
        RichCompare(Py_EQ).
      
      - Get rid of list_compare(), in favor of new list_richcompare().  The
        latter does some nice shortcuts, like when == or != is requested, it
        first compares the lengths for trivial accept/reject.  Then it goes
        over the items until it finds an index where the items differe; then
        it does more shortcut magic to minimize the number of additional
        comparisons.
      
      - Aligned the comments for large struct initializers.
      65e1cea6
    • Neil Schemenauer's avatar
      Bump up version number. · 7d645774
      Neil Schemenauer authored
      7d645774
    • Neil Schemenauer's avatar
      - compile struct module · e7e2ece9
      Neil Schemenauer authored
      - get version number from sys.version_info
      e7e2ece9
    • Fredrik Lundh's avatar
      a bold attempt to fix things broken by MAL's verify patch: import · f7850424
      Fredrik Lundh authored
      'verify' iff it's used by a test module...
      f7850424
    • Guido van Rossum's avatar
      Marc-Andre must not have run these tests -- they used verify() but · f27cc5bc
      Guido van Rossum authored
      didn't import it.  Also got rid of some inconsistent spaces inside
      parentheses in test_gzip.py.
      f27cc5bc
    • Guido van Rossum's avatar
      72264290
    • Guido van Rossum's avatar
      44a6ff6c
    • Guido van Rossum's avatar
      Deal properly (?) with comparing recursive datastructures. · 2ffbf6b1
      Guido van Rossum authored
      - Use the compare nesting level and in-progress dictionary properly in
        PyObject_RichCompare().
      
      - Change the in-progress code to use static variables instead of
        globals (both the nesting level and the key for the thread dict were
        globals but have no reason to be globals; the key can even be a
        function-static variable in get_inprogress_dict()).
      
      - Rewrote try_rich_to_3way_compare() to benefit from the similarity of
        the three cases, making it table-driven.
      
      - In try_rich_to_3way_compare(), test for EQ before LT and GT.  This
        turns out essential when comparing recursive UserList instances;
        with the old code, these would recurse into rich comparison three
        times for each nesting level up to NESTING_LIMIT/2, making the total
        number of calls in the order of 3**(NESTING_LIMIT/2)!
      
      NOTE: I'm not 100% comfortable with this.  It works for the standard
      test suite (which compares a few trivial recursive data structures
      only), but I'm not sure that the in-progress dictionary is used
      properly by the rich comparison code.  Jeremy suggested that maybe the
      operation should be included in the dict.  Currently I presume that
      objects in the dict are equal unless proven otherwise, and I set the
      outcome for the rich comparison accordingly: true for operators EQ,
      LE, GE, and false for the other three.  But Jeremy seems to think that
      there may be counter-examples where this doesn't do the right thing.
      2ffbf6b1
    • Andrew M. Kuchling's avatar
      Fix for bug #129173, reported by Skip Montanaro: · a99202a0
      Andrew M. Kuchling authored
         Check for the two possible headers for Expat, expat.h and xmlparse.h,
         and only compile the pyexpat module if one of them is found.
      a99202a0