diff options
author | Christian Heimes <christian@python.org> | 2022-08-16 18:20:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 18:20:15 (GMT) |
commit | 48174fa0b949d6b1d0c1f074e7d4e47793759a43 (patch) | |
tree | 0a226307f02413be0a6378aaf58a378004b5a3fb /Doc | |
parent | f215d7cac9a6f9b51ba864e4252686dee4e45d64 (diff) | |
download | cpython-48174fa0b949d6b1d0c1f074e7d4e47793759a43.zip cpython-48174fa0b949d6b1d0c1f074e7d4e47793759a43.tar.gz cpython-48174fa0b949d6b1d0c1f074e7d4e47793759a43.tar.bz2 |
gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006)
- On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
- The `errno` modules exposes the new error number.
- `getpath.py` now ignores `PermissionError` when it cannot open landmark
files `pybuilddir.txt` and `pyenv.cfg`.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/errno.rst | 9 | ||||
-rw-r--r-- | Doc/library/exceptions.rst | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index 035340e..da4e964 100644 --- a/Doc/library/errno.rst +++ b/Doc/library/errno.rst @@ -657,3 +657,12 @@ defined by the module. The specific list of defined symbols is available as Interface output queue is full .. versionadded:: 3.11 + +.. data:: ENOTCAPABLE + + Capabilities insufficient. This error is mapped to the exception + :exc:`PermissionError`. + + .. availability:: WASI + + .. versionadded:: 3.11.1 diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 2eccbd1..fc85627 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -746,7 +746,12 @@ depending on the system error code. Raised when trying to run an operation without the adequate access rights - for example filesystem permissions. - Corresponds to :c:data:`errno` :py:data:`~errno.EACCES` and :py:data:`~errno.EPERM`. + Corresponds to :c:data:`errno` :py:data:`~errno.EACCES`, + :py:data:`~errno.EPERM`, and :py:data:`~errno.ENOTCAPABLE`. + + .. versionchanged:: 3.11.1 + WASI's :py:data:`~errno.ENOTCAPABLE` is now mapped to + :exc:`PermissionError`. .. exception:: ProcessLookupError |