]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 9 Oct 2023 09:42:17 +0000 (11:42 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Oct 2023 09:42:17 +0000 (11:42 +0200)
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>
Doc/library/ctypes.rst
Doc/library/gettext.rst
Doc/library/http.cookiejar.rst
Doc/library/urllib.error.rst
Doc/library/zipimport.rst

index 19cee10711fb8970d939fe2fc4bcda983ceab8be..98e6dbf0dd183011d235d293090b158d86768ba9 100644 (file)
@@ -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)
index 7ebe91b372d35a018e79d26f068c7344907d5f48..dc6cf5533fccbe5af34269eac6371f9fb26c8d72 100644 (file)
@@ -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.
index 87ef156a0bed5784e22b7a3320256c73c7b268b9..12a6d768437ea54c7709886991f6cb6549a2cfbf 100644 (file)
@@ -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:
index a5bcb5b1e643bfb28903aa914b66c42f72981d16..facb11f42a40c571d8dee34916c7f5fd4068aac3 100644 (file)
@@ -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)
index 11d19e8c863e9f9c86d5754dad9f53f3f0ecc1f1..47c81f0e63603dcbc4bd03ef3c8becda7b28516d 100644 (file)
@@ -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)