FileSystemError is gone

This commit is contained in:
Antoine Pitrou 2011-08-30 18:13:41 +02:00
parent dd705440cb
commit 3ceecd9e7e
1 changed files with 5 additions and 12 deletions

View File

@ -396,14 +396,11 @@ the list of errnos mapped to them, is submitted to discussion:
as a generic timeout exception, replacing ``socket.timeout`` and also useful as a generic timeout exception, replacing ``socket.timeout`` and also useful
for other types of timeout (for example in Lock.acquire()) for other types of timeout (for example in Lock.acquire())
In addition, the following exception class are proposed for inclusion: In addition, the following exception class is proposed for inclusion:
* ``ConnectionError``: a base class for ``ConnectionAbortedError``, * ``ConnectionError``: a base class for ``ConnectionAbortedError``,
``ConnectionRefusedError`` and ``ConnectionResetError`` ``ConnectionRefusedError`` and ``ConnectionResetError``
* ``FileSystemError``: a base class for ``FileExistsError``,
``FileNotFoundError``, ``IsADirectoryError`` and ``NotADirectoryError``
The following drawing tries to sum up the proposed additions, along with The following drawing tries to sum up the proposed additions, along with
the corresponding errno values (where applicable). The root of the the corresponding errno values (where applicable). The root of the
sub-hierarchy (OSError, assuming `Step 1`_ is accepted in full) is not sub-hierarchy (OSError, assuming `Step 1`_ is accepted in full) is not
@ -415,12 +412,11 @@ shown::
+-- ConnectionAbortedError ECONNABORTED +-- ConnectionAbortedError ECONNABORTED
+-- ConnectionRefusedError ECONNREFUSED +-- ConnectionRefusedError ECONNREFUSED
+-- ConnectionResetError ECONNRESET +-- ConnectionResetError ECONNRESET
+-- FileSystemError +-- FileExistsError EEXIST
+-- FileExistsError EEXIST +-- FileNotFoundError ENOENT
+-- FileNotFoundError ENOENT
+-- IsADirectoryError EISDIR
+-- NotADirectoryError ENOTDIR
+-- InterruptedError EINTR +-- InterruptedError EINTR
+-- IsADirectoryError EISDIR
+-- NotADirectoryError ENOTDIR
+-- PermissionError EACCES, EPERM +-- PermissionError EACCES, EPERM
+-- TimeoutError ETIMEDOUT +-- TimeoutError ETIMEDOUT
@ -432,9 +428,6 @@ exception class names should end in "``Error``". In favour is consistency
with the rest of the exception hiearchy, against is concision (especially with the rest of the exception hiearchy, against is concision (especially
with long names such as ``ConnectionAbortedError``). with long names such as ``ConnectionAbortedError``).
Another cosmetic issue is whether ``FileSystemError`` should be spelled
``FilesystemError`` instead.
Exception attributes Exception attributes
-------------------- --------------------