1. 04 Oct, 2001 18 commits
  2. 03 Oct, 2001 13 commits
  3. 02 Oct, 2001 9 commits
    • Guido van Rossum's avatar
      dca0e034
    • Guido van Rossum's avatar
    • Tim Peters's avatar
      SF patch [#466616] Exclude imported items from doctest. · 929a87d5
      Tim Peters authored
      Another installment; the new functionality wasn't actually enabled in
      normal use, only in the strained use checked by the test case.
      929a87d5
    • Tim Peters's avatar
      SF bug [#467265] Compile errors on SuSe Linux on IBM/s390. · 6e7fedcc
      Tim Peters authored
      Unknown whether this fixes it.
      - stringobject.c, PyString_FromFormatV:  don't assume that va_list is of
        a type that can be copied via an initializer.
      - errors.c, PyErr_Format:  add a va_end() to balance the va_start().
      6e7fedcc
    • Guido van Rossum's avatar
      Add Garbage Collection support to new-style classes (not yet to their · 08face02
      Guido van Rossum authored
      instances).
      
      Also added GC support to various auxiliary types: super, property,
      descriptors, wrappers, dictproxy.  (Only type objects have a tp_clear
      field; the other types are.)
      
      One change was necessary to the GC infrastructure.  We have statically
      allocated type objects that don't have a GC header (and can't easily
      be given one) and heap-allocated type objects that do have a GC
      header.  Giving these different metatypes would be really ugly: I
      tried, and I had to modify pickle.py, cPickle.c, copy.py, add a new
      invent a new name for the new metatype and make it a built-in, change
      affected tests...  In short, a mess.  So instead, we add a new type
      slot tp_is_gc, which is a simple Boolean function that determines
      whether a particular instance has GC headers or not.  This slot is
      only relevant for types that have the (new) GC flag bit set.  If the
      tp_is_gc slot is NULL (by far the most common case), all instances of
      the type are deemed to have GC headers.  This slot is called by the
      PyObject_IS_GC() macro (which is only used twice, both times in
      gcmodule.c).
      
      I also changed the extern declarations for a bunch of GC-related
      functions (_PyObject_GC_Del etc.): these always exist but objimpl.h
      only declared them when WITH_CYCLE_GC was defined, but I needed to be
      able to reference them without #ifdefs.  (When WITH_CYCLE_GC is not
      defined, they do the same as their non-GC counterparts anyway.)
      08face02
    • Tim Peters's avatar
      CVS patch [#466628] Doc changes for doctest patch (#466616), from · 6b7b0778
      Tim Peters authored
      Tim Hochberg.  Doctest no longer searches imported objects.
      6b7b0778
    • Guido van Rossum's avatar
      pickles(): · 89f7901c
      Guido van Rossum authored
      - The test for deepcopy() in pickles() was indented wrongly, so it got
        run twice (one for binary pickle mode, one for text pickle mode; but
        the test doesn't depend on the pickle mode).
      
      - In verbose mode, show which subtest (pickle/cPickle/deepcopy, text/bin).
      89f7901c
    • Guido van Rossum's avatar
      The error reporting here was a bit sparse. In verbose mode, the code · c355bcfe
      Guido van Rossum authored
      in run_test() referenced two non-existent variables, and in
      non-verbose mode, the tests didn't report the actual number, when it
      differed from the expected number.  Fixed this.
      
      Also added an extra call to gc.collect() at the start of test_all().
      This will be needed when I check in the changes to add GC to new-style
      classes.
      c355bcfe
    • Guido van Rossum's avatar
      Under certain conditions (sometimes triggered by the test suite), · cd7ae253
      Guido van Rossum authored
      "from xml.parsers import expat" succeeds but the imported expat module
      is an empty shell.  Make sure we don't be fooled by that.
      cd7ae253