1. 23 Jul, 1998 6 commits
    • Barry Warsaw's avatar
      Several changes to support inclusion of filename in relevent · d58d7647
      Barry Warsaw authored
      exceptions:
      
      posix_error_with_filename(): New function which calls
      PyErr_SetFromErrnoWithFilename()
      
      The following methods have been changed to call
      posix_error_with_filename():
      
          posix_1str()
          posix_strint()
          posix_strintint()
          posix_do_stat()
          posix_mkdir()
          posix_utime()
          posix_readlink()
          posix_open()
      
      INITFUNC(): os.error (nee PosixError) is PyExc_OSError
      d58d7647
    • Barry Warsaw's avatar
      PyFile_FromString(): If an exception occurs, pass in the filename that · 52ddc0e7
      Barry Warsaw authored
      was used so it's reflected in the IOError.  Call
      PyErr_SetFromErrnoWithFilename().
      52ddc0e7
    • Barry Warsaw's avatar
      PyErr_SetFromErrnoWithFilename(): New function which supports setting · 97d95153
      Barry Warsaw authored
      an exception from errno, with a supplied filename (primarily used by
      IOError and OSError).  If class exceptions are used then the exception
      is instantiated with a 3-tuple: (errno, strerror, filename).  For
      backwards compatibility reasons, if string exceptions are used,
      filename is ignored.
      
      PyErr_SetFromErrno(): Implement in terms of
      PyErr_SetFromErrnoWithFilename().
      97d95153
    • Barry Warsaw's avatar
      Added support for including the filename in IOErrors and OSErrors that · 2dfe4de6
      Barry Warsaw authored
      involve a filesystem path.  To that end:
      
      - Changed IOError to EnvironmentError and added a hack which checks
        for arg of len 3.  When constructed with a 3-tuple, the third item
        is the filename and this is squirreled away in the `filename'
        attribute.   However, for in-place unpacking backwards
        compatibility, self.args still only gets the first two items.  Added
        a __str__() which prints the filename if it is given.
      
      - IOError now inherits from EnvironmentError
      
      - New class OSError which also inherits from EnvironmentError and is
        used by the posix module.
      2dfe4de6
    • Barry Warsaw's avatar
      Added support for two new standard errors: EnvironmentError and · d086a1a8
      Barry Warsaw authored
      OSError.  The EnvironmentError serves primarily as the (common
      implementation) base class for IOError and OSError.  OSError is used
      by posixmodule.c
      
      Also added tuple definition of EnvironmentError when using string
      based exceptions.
      d086a1a8
    • Barry Warsaw's avatar
      New global variables: PyExc_EnvironmentError and PyExc_OSError · 62a21a2e
      Barry Warsaw authored
      New function: PyErr_SetFromErrnoWithFilename(PyObject* char*)
      62a21a2e
  2. 22 Jul, 1998 6 commits
  3. 21 Jul, 1998 3 commits
  4. 20 Jul, 1998 11 commits
  5. 17 Jul, 1998 6 commits
  6. 16 Jul, 1998 4 commits
  7. 15 Jul, 1998 2 commits
  8. 14 Jul, 1998 1 commit
    • Guido van Rossum's avatar
      Temporarily get rid of the registration of Tcl_Finalize() as a · 43ff8683
      Guido van Rossum authored
      low-level Python exit handler.  This can attempt to call Python code
      at a point that the interpreter and thread state have already been
      destroyed, causing a Bus Error.  Given the intended use of
      Py_AtExit(), I'm not convinced that it's a good idea to call it
      earlier during Python's finalization sequence...  (Although this is
      the only use for it in the entire distribution.)
      43ff8683
  9. 13 Jul, 1998 1 commit