diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-09 09:42:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-09 09:42:17 (GMT) |
commit | a7fe709fef75e056698b80b9861c34fc362dc5aa (patch) | |
tree | c226a55807945935c43fb7f7065f7ce369cd999e | |
parent | 22474a1d62fef6b8223c5e33eae72fea78440d52 (diff) | |
download | cpython-a7fe709fef75e056698b80b9861c34fc362dc5aa.zip cpython-a7fe709fef75e056698b80b9861c34fc362dc5aa.tar.gz cpython-a7fe709fef75e056698b80b9861c34fc362dc5aa.tar.bz2 |
[3.12] gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH-110498) (#110546)
gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH-110498)
(cherry picked from commit 5e7edac7717bfe5f3c533d83ddd0f564db8de40b)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
-rw-r--r-- | Doc/library/ctypes.rst | 8 | ||||
-rw-r--r-- | Doc/library/gettext.rst | 2 | ||||
-rw-r--r-- | Doc/library/http.cookiejar.rst | 4 | ||||
-rw-r--r-- | Doc/library/urllib.error.rst | 4 | ||||
-rw-r--r-- | Doc/library/zipimport.rst | 2 |
5 files changed, 11 insertions, 9 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 19cee10..98e6dbf 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1403,7 +1403,8 @@ way is to instantiate one of the following classes: failure, an :class:`OSError` is automatically raised. .. versionchanged:: 3.3 - :exc:`WindowsError` used to be raised. + :exc:`WindowsError` used to be raised, + which is now an alias of :exc:`OSError`. .. versionchanged:: 3.12 @@ -2088,13 +2089,14 @@ Utility functions .. function:: WinError(code=None, descr=None) Windows only: this function is probably the worst-named thing in ctypes. It - creates an instance of OSError. If *code* is not specified, + creates an instance of :exc:`OSError`. If *code* is not specified, ``GetLastError`` is called to determine the error code. If *descr* is not specified, :func:`FormatError` is called to get a textual description of the error. .. versionchanged:: 3.3 - An instance of :exc:`WindowsError` used to be created. + An instance of :exc:`WindowsError` used to be created, which is now an + alias of :exc:`OSError`. .. function:: wstring_at(address, size=-1) diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst index 7ebe91b..dc6cf55 100644 --- a/Doc/library/gettext.rst +++ b/Doc/library/gettext.rst @@ -167,7 +167,7 @@ install themselves in the built-in namespace as the function :func:`!_`. :class:`NullTranslations` instance if *fallback* is true. .. versionchanged:: 3.3 - :exc:`IOError` used to be raised instead of :exc:`OSError`. + :exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`. .. versionchanged:: 3.11 *codeset* parameter is removed. diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst index 87ef156..12a6d76 100644 --- a/Doc/library/http.cookiejar.rst +++ b/Doc/library/http.cookiejar.rst @@ -44,8 +44,8 @@ The module defines the following exception: cookies from a file. :exc:`LoadError` is a subclass of :exc:`OSError`. .. versionchanged:: 3.3 - LoadError was made a subclass of :exc:`OSError` instead of - :exc:`IOError`. + :exc:`LoadError` used to be a subtype of :exc:`IOError`, which is now an + alias of :exc:`OSError`. The following classes are provided: diff --git a/Doc/library/urllib.error.rst b/Doc/library/urllib.error.rst index a5bcb5b..facb11f 100644 --- a/Doc/library/urllib.error.rst +++ b/Doc/library/urllib.error.rst @@ -27,8 +27,8 @@ The following exceptions are raised by :mod:`urllib.error` as appropriate: exception instance. .. versionchanged:: 3.3 - :exc:`URLError` has been made a subclass of :exc:`OSError` instead - of :exc:`IOError`. + :exc:`URLError` used to be a subtype of :exc:`IOError`, which is now an + alias of :exc:`OSError`. .. exception:: HTTPError(url, code, msg, hdrs, fp) diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst index 11d19e8..47c81f0 100644 --- a/Doc/library/zipimport.rst +++ b/Doc/library/zipimport.rst @@ -113,7 +113,7 @@ zipimporter Objects file wasn't found. .. versionchanged:: 3.3 - :exc:`IOError` used to be raised instead of :exc:`OSError`. + :exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`. .. method:: get_filename(fullname) |