1. 06 Mar, 2007 2 commits
  2. 05 Mar, 2007 3 commits
  3. 04 Mar, 2007 3 commits
  4. 02 Mar, 2007 3 commits
  5. 01 Mar, 2007 3 commits
  6. 28 Feb, 2007 4 commits
  7. 27 Feb, 2007 6 commits
    • Jeremy Hylton's avatar
    • Jeremy Hylton's avatar
      Add checking for a number of metaclass error conditions. · 6d1a799d
      Jeremy Hylton authored
      We add some new rules that are required for preserving internal
      invariants of types.
      
      1.  If type (or a subclass of type) appears in bases, it must appear
          before any non-type bases.  If a non-type base (like a regular
          new-style class) occurred first, it could trick type into
          allocating the new class an __dict__ which must be impossible.
      
      2. There are several checks that are made of bases when creating a
         type.  Those checks are now repeated when assigning to __bases__.
         We also add the restriction that assignment to __bases__ may not
         change the metaclass of the type.
      
      Add new tests for these cases and for a few other oddball errors that
      were no previously tested.  Remove a crasher test that was fixed.
      
      Also some internal refactoring:  Extract the code to find the most
      derived metaclass of a type and its bases.  It is now needed in two
      places.  Rewrite the TypeError checks in test_descr to use doctest.
      The tests now clearly show what exception they expect to see.
      6d1a799d
    • Jeremy Hylton's avatar
      whitespace normalization · 7d19e116
      Jeremy Hylton authored
      7d19e116
    • Jeremy Hylton's avatar
      tabify · 22f09403
      Jeremy Hylton authored
      Note that ast.c still has a mix of tabs and spaces, because it
      attempts to use four-space indents for more of the new code.
      22f09403
    • Jeremy Hylton's avatar
      tabify · a5807227
      Jeremy Hylton authored
      a5807227
    • Jeremy Hylton's avatar
      Fix long-standing bug in name mangling for package imports · aaddf742
      Jeremy Hylton authored
      Reported by Mike Verdone.
      aaddf742
  8. 26 Feb, 2007 11 commits
  9. 25 Feb, 2007 5 commits
    • Thomas Wouters's avatar
      Backported r51621 from p3yk: · 51d2dee1
      Thomas Wouters authored
      Don't use a fixed temporary name (gdbm).
      Don't use our own temp name creation (dbm).
      Should be backported to 2.5.
      51d2dee1
    • Neal Norwitz's avatar
      Variation of patch # 1624059 to speed up checking if an object is a subclass · 96dafc13
      Neal Norwitz authored
      of some of the common builtin types.
      
      Use a bit in tp_flags for each common builtin type.  Check the bit
      to determine if any instance is a subclass of these common types.
      The check avoids a function call and O(n) search of the base classes.
      The check is done in the various Py*_Check macros rather than calling
      PyType_IsSubtype().
      
      All the bits are set in tp_flags when the type is declared
      in the Objects/*object.c files because PyType_Ready() is not called
      for all the types.  Should PyType_Ready() be called for all types?
      If so and the change is made, the changes to the Objects/*object.c files
      can be reverted (remove setting the tp_flags).  Objects/typeobject.c
      would also have to be modified to add conditions
      for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
      96dafc13
    • Fred Drake's avatar
      - SF patch #1657613: add documentation for the Element interface · 239810fc
      Fred Drake authored
      - clean up bogus use of the {datadescni} environment everywhere
      239810fc
    • Jeremy Hylton's avatar
      Put declarations before code. · 2f817591
      Jeremy Hylton authored
      2f817591
    • Jeremy Hylton's avatar
      Fix crash in exec when unicode filename can't be decoded. · c22e31af
      Jeremy Hylton authored
      I can't think of an easy way to test this behavior.  It only occurs
      when the file system default encoding and the interpreter default
      encoding are different, such that you can open the file but not decode
      its name.
      c22e31af