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
|
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
|
||||||
|
+-- InterruptedError EINTR
|
||||||
+-- IsADirectoryError EISDIR
|
+-- IsADirectoryError EISDIR
|
||||||
+-- NotADirectoryError ENOTDIR
|
+-- NotADirectoryError ENOTDIR
|
||||||
+-- InterruptedError EINTR
|
|
||||||
+-- 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
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue