Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5e7edac

Browse filesBrowse files
authored
pythongh-110497: Add note about OSError being an alias to IOError in docs (python#110498)
1 parent c49edd7 commit 5e7edac
Copy full SHA for 5e7edac

File tree

5 files changed

+11
-9
lines changed
Filter options

5 files changed

+11
-9
lines changed

‎Doc/library/ctypes.rst

Copy file name to clipboardExpand all lines: Doc/library/ctypes.rst
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,8 @@ way is to instantiate one of the following classes:
14031403
failure, an :class:`OSError` is automatically raised.
14041404

14051405
.. versionchanged:: 3.3
1406-
:exc:`WindowsError` used to be raised.
1406+
:exc:`WindowsError` used to be raised,
1407+
which is now an alias of :exc:`OSError`.
14071408

14081409
.. versionchanged:: 3.12
14091410

@@ -2088,13 +2089,14 @@ Utility functions
20882089
.. function:: WinError(code=None, descr=None)
20892090

20902091
Windows only: this function is probably the worst-named thing in ctypes. It
2091-
creates an instance of OSError. If *code* is not specified,
2092+
creates an instance of :exc:`OSError`. If *code* is not specified,
20922093
``GetLastError`` is called to determine the error code. If *descr* is not
20932094
specified, :func:`FormatError` is called to get a textual description of the
20942095
error.
20952096

20962097
.. versionchanged:: 3.3
2097-
An instance of :exc:`WindowsError` used to be created.
2098+
An instance of :exc:`WindowsError` used to be created, which is now an
2099+
alias of :exc:`OSError`.
20982100

20992101

21002102
.. function:: wstring_at(address, size=-1)

‎Doc/library/gettext.rst

Copy file name to clipboardExpand all lines: Doc/library/gettext.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ install themselves in the built-in namespace as the function :func:`!_`.
167167
:class:`NullTranslations` instance if *fallback* is true.
168168

169169
.. versionchanged:: 3.3
170-
:exc:`IOError` used to be raised instead of :exc:`OSError`.
170+
:exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`.
171171

172172
.. versionchanged:: 3.11
173173
*codeset* parameter is removed.

‎Doc/library/http.cookiejar.rst

Copy file name to clipboardExpand all lines: Doc/library/http.cookiejar.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ The module defines the following exception:
4444
cookies from a file. :exc:`LoadError` is a subclass of :exc:`OSError`.
4545

4646
.. versionchanged:: 3.3
47-
LoadError was made a subclass of :exc:`OSError` instead of
48-
:exc:`IOError`.
47+
:exc:`LoadError` used to be a subtype of :exc:`IOError`, which is now an
48+
alias of :exc:`OSError`.
4949

5050

5151
The following classes are provided:

‎Doc/library/urllib.error.rst

Copy file name to clipboardExpand all lines: Doc/library/urllib.error.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ The following exceptions are raised by :mod:`urllib.error` as appropriate:
2727
exception instance.
2828

2929
.. versionchanged:: 3.3
30-
:exc:`URLError` has been made a subclass of :exc:`OSError` instead
31-
of :exc:`IOError`.
30+
:exc:`URLError` used to be a subtype of :exc:`IOError`, which is now an
31+
alias of :exc:`OSError`.
3232

3333

3434
.. exception:: HTTPError(url, code, msg, hdrs, fp)

‎Doc/library/zipimport.rst

Copy file name to clipboardExpand all lines: Doc/library/zipimport.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ zipimporter Objects
113113
file wasn't found.
114114

115115
.. versionchanged:: 3.3
116-
:exc:`IOError` used to be raised instead of :exc:`OSError`.
116+
:exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`.
117117

118118

119119
.. method:: get_filename(fullname)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.