1. 04 Haz, 2002 1 kayıt (commit)
    • Jason Tishler's avatar
      Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***) · bc48826d
      Jason Tishler yazdı
      This patch complies with the following request found
      near the top of configure.in:
      
      # This is for stuff that absolutely must end up in pyconfig.h.
      # Please use pyport.h instead, if possible.
      
      I tested this patch under Cygwin, Win32, and Red
      Hat Linux. Python built and ran successfully on
      each of these platforms.
      bc48826d
  2. 29 May, 2002 2 kayıt (commit)
  3. 27 May, 2002 1 kayıt (commit)
  4. 24 May, 2002 3 kayıt (commit)
  5. 15 May, 2002 2 kayıt (commit)
    • Martin v. Löwis's avatar
      Back out #555929 · 1e1fcef7
      Martin v. Löwis yazdı
      1e1fcef7
    • Jason Tishler's avatar
      Patch #555929: Cygwin AH_BOTTOM cleanup patch · eadb6bb3
      Jason Tishler yazdı
      This patch complies with the following request found
      near the top of configure.in:
      
      # This is for stuff that absolutely must end up in pyconfig.h.
      # Please use pyport.h instead, if possible.
      
      I tested this patch under Cygwin, Win32, and Red
      Hat Linux. Python built and ran successfully on
      each of these platforms.
      eadb6bb3
  6. 08 May, 2002 1 kayıt (commit)
  7. 04 May, 2002 1 kayıt (commit)
  8. 02 May, 2002 1 kayıt (commit)
  9. 28 Nis, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      Moving pymalloc along. · 8b078f95
      Tim Peters yazdı
      As threatened, PyMem_{Free, FREE} also invoke the object deallocator now
      when pymalloc is enabled (well, it does when pymalloc isn't enabled too,
      but in that case "the object deallocator" is plain free()).
      
      This is maximally backward-compatible, but it leaves a bitter aftertaste.
      
      Also massive reworking of comments.
      8b078f95
  10. 26 Nis, 2002 1 kayıt (commit)
  11. 22 Nis, 2002 2 kayıt (commit)
    • Walter Dörwald's avatar
      Apply patch diff.txt from SF feature request · de02bcb2
      Walter Dörwald yazdı
      http://www.python.org/sf/444708
      
      This adds the optional argument for str.strip
      to unicode.strip too and makes it possible
      to call str.strip with a unicode argument
      and unicode.strip with a str argument.
      de02bcb2
    • Tim Peters's avatar
      Moving pymalloc along. · 51e7f5ca
      Tim Peters yazdı
      + Redirect PyMem_{Del, DEL} to the object allocator's free() when
        pymalloc is enabled.  Needed so old extensions can continue to
        mix PyObject_New with PyMem_DEL.
      
      + This implies that pgen needs to be able to see the PyObject_XYZ
        declarations too.  pgenheaders.h now includes Python.h.  An
        implication is that I expect obmalloc.o needs to get linked into
        pgen on non-Windows boxes.
      
      + When PYMALLOC_DEBUG is defined, *all* Py memory API functions
        now funnel through the debug allocator wrapper around pymalloc.
        This is the default in a debug build.
      
      + That caused compile.c to fail:  it indirectly mixed PyMem_Malloc
        with raw platform free() in one place.  This is verbotten.
      51e7f5ca
  12. 21 Nis, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      Py_UniversalNewlineFread(): Many changes. · 058b141e
      Tim Peters yazdı
      + Continued looping until n bytes in the buffer have been filled, not
        just when n bytes have been read from the file.  This repairs the
        bug that f.readlines() only sucked up the first 8192 bytes of the file
        on Windows when universal newlines was enabled and f was opened in
        U mode (see Python-Dev -- this was the ultimate cause of the
        test_inspect.py failure).
      
      + Changed prototye to take a char* buffer (void* doesn't make much sense).
      
      + Squashed size_t vs int mismatches (in particular, besides the unsigned
        vs signed distinction, size_t may be larger than int).
      
      + Gets out under all error conditions now (it's possible for fread() to
        suffer an error even if it returns a number larger than 0 -- any
        "short read" is an error or EOF condition).
      
      + Rearranged and simplified declarations.
      058b141e
  13. 14 Nis, 2002 1 kayıt (commit)
    • Jack Jansen's avatar
      Mass checkin of universal newline support. · 7b8c7546
      Jack Jansen yazdı
      Highlights: import and friends will understand any of \r, \n and \r\n
      as end of line. Python file input will do the same if you use mode 'U'.
      Everything can be disabled by configuring with --without-universal-newlines.
      
      See PEP278 for details.
      7b8c7546
  14. 13 Nis, 2002 1 kayıt (commit)
  15. 12 Nis, 2002 6 kayıt (commit)
  16. 11 Nis, 2002 2 kayıt (commit)
  17. 06 Nis, 2002 1 kayıt (commit)
  18. 04 Nis, 2002 1 kayıt (commit)
  19. 03 Nis, 2002 2 kayıt (commit)
    • Guido van Rossum's avatar
      5f820367
    • Guido van Rossum's avatar
      Add the 'bool' type and its values 'False' and 'True', as described in · 77f6a65e
      Guido van Rossum yazdı
      PEP 285.  Everything described in the PEP is here, and there is even
      some documentation.  I had to fix 12 unit tests; all but one of these
      were printing Boolean outcomes that changed from 0/1 to False/True.
      (The exception is test_unicode.py, which did a type(x) == type(y)
      style comparison.  I could've fixed that with a single line using
      issubtype(x, type(y)), but instead chose to be explicit about those
      places where a bool is expected.
      
      Still to do: perhaps more documentation; change standard library
      modules to return False/True from predicates.
      77f6a65e
  20. 01 Nis, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      New PYMALLOC_DEBUG function void _PyMalloc_DebugDumpStats(void). · 7ccfadf3
      Tim Peters yazdı
      This displays stats about the # of arenas, pools, blocks and bytes, to
      stderr, both used and reserved but unused.
      
      CAUTION:  Because PYMALLOC_DEBUG is on, the debug malloc routine adds
      16 bytes to each request.  This makes each block appear two size classes
      higher than it would be if PYMALLOC_DEBUG weren't on.
      
      So far, playing with this confirms the obvious:  there's a lot of activity
      in the "small dict" size class, but nothing in the core makes any use of
      the 8-byte or 16-byte classes.
      7ccfadf3
  21. 30 Mar, 2002 1 kayıt (commit)
  22. 29 Mar, 2002 1 kayıt (commit)
  23. 28 Mar, 2002 3 kayıt (commit)
    • Neil Schemenauer's avatar
    • Tim Peters's avatar
      PYMALLOC_DEBUG routines: The "check API family" gimmick was going nowhere · d1139e04
      Tim Peters yazdı
      fast, and just cluttered the code.  Get rid of it for now.  If a compelling
      case can be made for it, easy to restore it later.
      d1139e04
    • Fred Drake's avatar
      Introduce two new flag bits that can be set in a PyMethodDef method · 7bf9715a
      Fred Drake yazdı
      descriptor, as used for the tp_methods slot of a type.  These new flag
      bits are both optional, and mutually exclusive.  Most methods will not
      use either.  These flags are used to create special method types which
      exist in the same namespace as normal methods without having to use
      tedious construction code to insert the new special method objects in
      the type's tp_dict after PyType_Ready() has been called.
      
      If METH_CLASS is specified, the method will represent a class method
      like that returned by the classmethod() built-in.
      
      If METH_STATIC is specified, the method will represent a static method
      like that returned by the staticmethod() built-in.
      
      These flags may not be used in the PyMethodDef table for modules since
      these special method types are not meaningful in that case; a
      ValueError will be raised if these flags are found in that context.
      7bf9715a
  24. 25 Mar, 2002 2 kayıt (commit)
  25. 23 Mar, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      Give Python a debug-mode pymalloc, much as sketched on Python-Dev. · ddea208b
      Tim Peters yazdı
      When WITH_PYMALLOC is defined, define PYMALLOC_DEBUG to enable the debug
      allocator.  This can be done independent of build type (release or debug).
      A debug build automatically defines PYMALLOC_DEBUG when pymalloc is
      enabled.  It's a detected error to define PYMALLOC_DEBUG when pymalloc
      isn't enabled.
      
      Two debugging entry points defined only under PYMALLOC_DEBUG:
      
      + _PyMalloc_DebugCheckAddress(const void *p) can be used (e.g., from gdb)
        to sanity-check a memory block obtained from pymalloc.  It sprays
        info to stderr (see next) and dies via Py_FatalError if the block is
        detectably damaged.
      
      + _PyMalloc_DebugDumpAddress(const void *p) can be used to spray info
        about a debug memory block to stderr.
      
      A tiny start at implementing "API family" checks isn't good for
      anything yet.
      
      _PyMalloc_DebugRealloc() has been optimized to do little when the new
      size is <= old size.  However, if the new size is larger, it really
      can't call the underlying realloc() routine without either violating its
      contract, or knowing something non-trivial about how the underlying
      realloc() works.  A memcpy is always done in this case.
      
      This was a disaster for (and only) one of the std tests:  test_bufio
      creates single text file lines up to a million characters long.  On
      Windows, fileobject.c's get_line() uses the horridly funky
      getline_via_fgets(), which keeps growing and growing a string object
      hoping to find a newline.  It grew the string object 1000 bytes each
      time, so for a million-character string it took approximately forever
      (I gave up after a few minutes).
      
      So, also:
      
      fileobject.c, getline_via_fgets():  When a single line is outrageously
      long, grow the string object at a mildly exponential rate, instead of
      just 1000 bytes at a time.
      
      That's enough so that a debug-build test_bufio finishes in about 5 seconds
      on my Win98SE box.  I'm curious to try this on Win2K, because it has very
      different memory behavior than Win9X, and test_bufio always took a factor
      of 10 longer to complete on Win2K.  It *could* be that the endless
      reallocs were simply killing it on Win2K even in the release build.
      ddea208b