FileSystemError is gone
This commit is contained in:
parent
dd705440cb
commit
3ceecd9e7e
11
pep-3151.txt
11
pep-3151.txt
|
@ -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
|
||||
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``,
|
||||
``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 corresponding errno values (where applicable). The root of the
|
||||
sub-hierarchy (OSError, assuming `Step 1`_ is accepted in full) is not
|
||||
|
@ -415,12 +412,11 @@ shown::
|
|||
+-- ConnectionAbortedError ECONNABORTED
|
||||
+-- ConnectionRefusedError ECONNREFUSED
|
||||
+-- ConnectionResetError ECONNRESET
|
||||
+-- FileSystemError
|
||||
+-- FileExistsError EEXIST
|
||||
+-- FileNotFoundError ENOENT
|
||||
+-- InterruptedError EINTR
|
||||
+-- IsADirectoryError EISDIR
|
||||
+-- NotADirectoryError ENOTDIR
|
||||
+-- InterruptedError EINTR
|
||||
+-- PermissionError EACCES, EPERM
|
||||
+-- 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 long names such as ``ConnectionAbortedError``).
|
||||
|
||||
Another cosmetic issue is whether ``FileSystemError`` should be spelled
|
||||
``FilesystemError`` instead.
|
||||
|
||||
Exception attributes
|
||||
--------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue