1. 06 Mar, 2007 1 commit
  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. · fa955697
      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.
      fa955697
    • Jeremy Hylton's avatar
      whitespace normalization · 2d1f5c93
      Jeremy Hylton authored
      2d1f5c93
    • Jeremy Hylton's avatar
      tabify · 819de6ce
      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.
      819de6ce
    • Jeremy Hylton's avatar
      tabify · 18623e25
      Jeremy Hylton authored
      18623e25
    • Jeremy Hylton's avatar
      Fix long-standing bug in name mangling for package imports · 37075c5a
      Jeremy Hylton authored
      Reported by Mike Verdone.
      37075c5a
  8. 26 Feb, 2007 11 commits
  9. 25 Feb, 2007 6 commits
    • Thomas Wouters's avatar
      Backported r51621 from p3yk: · 110054c0
      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.
      110054c0
    • Neal Norwitz's avatar
      Variation of patch # 1624059 to speed up checking if an object is a subclass · ee3a1b52
      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.
      ee3a1b52
    • Fred Drake's avatar
      - SF patch #1657613: add documentation for the Element interface · 5a3e8124
      Fred Drake authored
      - clean up bogus use of the {datadescni} environment everywhere
      5a3e8124
    • Jeremy Hylton's avatar
      Put declarations before code. · 714b112a
      Jeremy Hylton authored
      714b112a
    • Jeremy Hylton's avatar
      Fix crash in exec when unicode filename can't be decoded. · c5ceb251
      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.
      c5ceb251
    • Neal Norwitz's avatar
      Whitespace only changes · 7218c2d2
      Neal Norwitz authored
      7218c2d2