1. 01 May, 2000 11 commits
    • Guido van Rossum's avatar
      Marc-Andre Lemburg: · d8cfbee4
      Guido van Rossum authored
      Changed all references to the MAGIC constant to use a global
      pyc_magic instead. This global is initially set to MAGIC, but can be
      changed by the _PyImport_Init() function to provide for
      special features implemented in the compiler which are settable
      using command line switches and affect the way PYC files are
      generated.
      
      Currently this change is only done for the -U flag.
      d8cfbee4
    • Guido van Rossum's avatar
      Eric Raymond: · 23d62943
      Guido van Rossum authored
      (1) Added and documented the capability for shlex to handle
      lexical-level inclusion and a stack of input sources.  Also, the input
      stream member is now documented, and the constructor takes an optional
      source-filename.  The class provides facilities to generate error
      messages that track file and line number.
      
      (2) Add a convenience function to generate C-compiler style error
      leaders.
      23d62943
    • Guido van Rossum's avatar
      Eric Raymond: · e9e9b799
      Guido van Rossum authored
      Add a convenience function to generate C-compiler style error leaders.
      e9e9b799
    • Guido van Rossum's avatar
      Eric Raymond: · 2bdca80e
      Guido van Rossum authored
      Added and documented the capability for shlex to handle lexical-level
      inclusion and a stack of input sources.  Also, the input stream member
      is now documented, and the constructor takes an optional source-filename.
      The class provides facilities to generate error messages that track
      file and line number.
      
      [GvR: I changed the __main__ code so that it actually stops at EOF, as
      Eric surely intended -- however it returned '' instead of the None he
      was testing for.]
      2bdca80e
    • Guido van Rossum's avatar
      Marc-Andre Lemburg: · 634ea521
      Guido van Rossum authored
      Added Py_UnicodeFlag for use by the -U command line option.
      634ea521
    • Guido van Rossum's avatar
      Marc-Andre Lemburg: · 0c0b42e3
      Guido van Rossum authored
      Support for the new -U command line option option:
      with the option enabled the Python compiler
      interprets all "..." strings as u"..." (same with r"..." and
      ur"...").
      0c0b42e3
    • Guido van Rossum's avatar
      Marc-Andre Lemburg: · f6ce17f1
      Guido van Rossum authored
      Added -U command line option.
      
      With the option enabled the Python compiler interprets all "..."
      strings as u"..." (same with r"..." and ur"...").
      f6ce17f1
    • Guido van Rossum's avatar
      Robin Becker: The following patch seems to fix a module case bug in · 9e6fe70d
      Guido van Rossum authored
      1.6a2 caused by wrong return values in routine allcaps83.  [GvR: I
      also changed the case for end-s>8 to return 0.]
      9e6fe70d
    • Barry Warsaw's avatar
      Document the new additional signature for utime(). In addition to the · 9a75d7cb
      Barry Warsaw authored
      previous functionality utime(path, (atime, mtime)), now allowed is
      utime(path, None) which sets the file's times to the current time.
      9a75d7cb
    • Guido van Rossum's avatar
      Marc-Andre Lemburg: · eccec141
      Guido van Rossum authored
      The two methods .readline() and .readlines() in StreamReaderWriter
      didn't define the self argument. Found by Tom Emerson.
      eccec141
    • Barry Warsaw's avatar
      posix_utime(): Allow the second argument to be None, which invokes the · 20b3fc97
      Barry Warsaw authored
      utime(path, NULL) call, setting the atime and mtime of the file to the
      current time.  The previous signature utime(path, (atime, mtime)) is
      of course still allowed.
      20b3fc97
  2. 28 Apr, 2000 14 commits
  3. 27 Apr, 2000 12 commits
  4. 26 Apr, 2000 3 commits
    • Jack Jansen's avatar
      Almost ready for 1.6a2. · cb7bbcfd
      Jack Jansen authored
      cb7bbcfd
    • Guido van Rossum's avatar
      Jack Jansen: · 8f091f10
      Guido van Rossum authored
      This patch is a workaround for Macintosh, where the GUSI I/O library
      (time, stat, etc) use the MacOS epoch of 1-Jan-1904 and the MSL C
      library (ctime, localtime, etc) uses the (apparently ANSI standard)
      epoch of 1-Jan-1900. Python programs see the MacOS epoch and we
      convert values when needed.
      8f091f10
    • Jeremy Hylton's avatar
      potentially useless optimization · 39fd144c
      Jeremy Hylton authored
      The previous checkin (2.84) added a PyErr_Format call that made the
      cost of raising an AttributeError much more expensive.  In general
      this doesn't matter, except that checks for __init__ and
      __del__ methods, where exceptions are caught and cleared in C, also
      got much more expensive.
      
      The fix is to split instance_getattr1 into two calls:
      
      instance_getattr2 checks the instance and the class for the attribute
      and returns it or returns NULL on error.  It does not raise an
      exception.
      
      instance_getattr1 does rexec checks, then calls instance_getattr2.  It
      raises an exception if instance_getattr2 returns NULL.
      
      PyInstance_New and instance_dealloc now call instance_getattr2
      directly.
      39fd144c