1. 05 May, 2000 10 kayıt (commit)
  2. 04 May, 2000 7 kayıt (commit)
    • Guido van Rossum's avatar
      Fast NonRecursiveMutex support by Yakov Markovitch, markovitch@iso.ru, · 706262bd
      Guido van Rossum yazdı
      who wrote:
      
      Here's the new version of thread_nt.h.  More particular, there is a
      new version of thread lock that uses kernel object (e.g. semaphore)
      only in case of contention; in other case it simply uses interlocked
      functions, which are faster by the order of magnitude.  It doesn't
      make much difference without threads present, but as soon as thread
      machinery initialised and (mostly) the interpreter global lock is on,
      difference becomes tremendous.  I've included a small script, which
      initialises threads and launches pystone.  With original thread_nt.h,
      Pystone results with initialised threads are twofold worse then w/o
      threads.  With the new version, only 10% worse.  I have used this
      patch for about 6 months (with threaded and non-threaded
      applications).  It works remarkably well (though I'd desperately
      prefer Python was free-threaded; I hope, it will soon).
      706262bd
    • Guido van Rossum's avatar
      When the UTF-8 conversion to Unicode fails, return an 8-bit string · 69529ad0
      Guido van Rossum yazdı
      instead.  This seems more robust than returning an Unicode string with
      some unconverted charcters in it.
      
      This still doesn't support getting truly binary data out of Tcl, since
      we look for the trailing null byte; but the old (pre-Unicode) code did
      this too, so apparently there's no need.  (Plus, I really don't feel
      like finding out how Tcl deals with this in each version.)
      69529ad0
    • Guido van Rossum's avatar
      03e29f1a
    • Jack Jansen's avatar
      301f3f6b
    • Guido van Rossum's avatar
      Two changes to improve (I hope) Unicode support. · 990f5c6c
      Guido van Rossum yazdı
      1. In Tcl 8.2 and later, use Tcl_NewUnicodeObj() when passing a Python
      Unicode object rather than going through UTF-8.  (This function
      doesn't exist in Tcl 8.1, so there the original UTF-8 code is still
      used; in Tcl 8.0 there is no support for Unicode.)  This assumes that
      Tcl_UniChar is the same thing as Py_UNICODE; a run-time error is
      issued if this is not the case.
      
      2. In Tcl 8.1 and later (i.e., whenever Tcl supports Unicode), when a
      string returned from Tcl contains bytes with the top bit set, we
      assume it is encoded in UTF-8, and decode it into a Unicode string
      object.
      
      Notes:
      
      - Passing Unicode strings to Tcl 8.0 does not do the right thing; this
      isn't worth fixing.
      
      - When passing an 8-bit string to Tcl 8.1 or later that has bytes with
      the top bit set, Tcl tries to interpret it as UTF-8; it seems to fall
      back on Latin-1 for non-UTF-8 bytes.  I'm not sure what to do about
      this besides telling the user to disambiguate such strings by
      converting them to Unicode (forcing the user to be explicit about the
      encoding).
      
      - Obviously it won't be possible to get binary data out of Tk this
      way.  Do we need that ability?  How to do it?
      990f5c6c
    • Guido van Rossum's avatar
    • Guido van Rossum's avatar
      49517821
  3. 03 May, 2000 14 kayıt (commit)
  4. 02 May, 2000 9 kayıt (commit)
    • Jeremy Hylton's avatar
      patches from Mark Hammond · be317e61
      Jeremy Hylton yazdı
      Attached is a set of diffs for the .py compiler that adds support
      for the new extended call syntax.
      
      compiler/ast.py:
      CallFunc node gets 2 new children to support extended call syntax -
      "star_args" (for "*args") and "dstar_args" (for "**args")
      
      compiler/pyassem.py
      It appear that self.lnotab is supposed to be responsible for
      tracking line numbers, but self.firstlineno was still hanging
      around.  Removed self.firstlineno completely.  NOTE - I didnt
      actually test that the generated code has the correct line numbers!!
      
      Stack depth tracking appeared a little broken - the checks never
      made it beyond the "self.patterns" check - thus, the custom methods
      were never called!  Fixed this.
      
      (XXX Jeremy notes: I think this code is still broken because it
      doesn't track stack effects across block bounaries.)
      
      Added support for the new extended call syntax opcodes for depth
      calculations.
      
      compiler/pycodegen.py
      
      Added support for the new extended call syntax opcodes.
      
      compiler/transformer.py
      
      Added support for the new extended call syntax.
      be317e61
    • Jeremy Hylton's avatar
      patches from Mark Hammond · 0a4f1ff6
      Jeremy Hylton yazdı
      compile.py:
      On Windows, use 'nul' instead of '/dev/null'.
      
      test.py:
      Use double-quotes for the command-line, as Windows doesnt recognise
      singles.
      0a4f1ff6
    • Guido van Rossum's avatar
      Disable the ZEROTRAP code -- this turns a 0 byte into a 2 byte and I · 7d64b48e
      Guido van Rossum yazdı
      don't think that's what we want.  There was some brief discussion
      of this somewhere but I don't recall where.
      7d64b48e
    • Barry Warsaw's avatar
      75a6e67e
    • Barry Warsaw's avatar
      PyErr_GivenExceptionMatches(): Check for err==NULL and exc==NULL and · fa5c315a
      Barry Warsaw yazdı
      return 0 (exceptions don't match).  This means that if an ImportError
      is raised because exceptions.py can't be imported, the interpreter
      will exit "cleanly" with an error message instead of just core
      dumping.
      
      PyErr_SetFromErrnoWithFilename(), PyErr_SetFromWindowsErrWithFilename():
      Don't test on Py_UseClassExceptionsFlag.
      fa5c315a
    • Barry Warsaw's avatar
      48719d3d
    • Barry Warsaw's avatar
      initerrors(): Remove this function. String-based standard exceptions · 47eeb9bd
      Barry Warsaw yazdı
      are no longer supported (i.e. -X option is removed).
      
      _PyBuiltin_Init_1(): Don't call initerrors().  This does mean that it
      is possible to raise an ImportError before that exception has been
      initialized, say because exceptions.py can't be found, or contains
      bogosity.  See changes to errors.c for how this is handled.
      
      _PyBuiltin_Init_2(): Don't test Py_UseClassExceptionsFlag, just go
      ahead and initialize the class-based standard exceptions.  If this
      fails, we throw a Py_FatalError.
      47eeb9bd
    • Barry Warsaw's avatar
      usage_mid: Remove the description of the -X flag; it's gone now. · 57e11ae8
      Barry Warsaw yazdı
      Py_Main(): Remove the 'X' case.
      57e11ae8
    • Barry Warsaw's avatar
      Py_UseClassExceptionsFlag is deprecated. We keep the C variable for C · 3ce09645
      Barry Warsaw yazdı
      API consistency, but nothing sets it or checks it now.
      3ce09645