mirror of
https://github.com/python/cpython
synced 2024-10-15 09:43:22 +00:00
gh-110497: Add note about OSError
being an alias to IOError
in docs (#110498)
This commit is contained in:
parent
c49edd7d9c
commit
5e7edac771
|
@ -1403,7 +1403,8 @@ way is to instantiate one of the following classes:
|
||||||
failure, an :class:`OSError` is automatically raised.
|
failure, an :class:`OSError` is automatically raised.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. 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
|
.. versionchanged:: 3.12
|
||||||
|
|
||||||
|
@ -2088,13 +2089,14 @@ Utility functions
|
||||||
.. function:: WinError(code=None, descr=None)
|
.. function:: WinError(code=None, descr=None)
|
||||||
|
|
||||||
Windows only: this function is probably the worst-named thing in ctypes. It
|
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
|
``GetLastError`` is called to determine the error code. If *descr* is not
|
||||||
specified, :func:`FormatError` is called to get a textual description of the
|
specified, :func:`FormatError` is called to get a textual description of the
|
||||||
error.
|
error.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. 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)
|
.. function:: wstring_at(address, size=-1)
|
||||||
|
|
|
@ -167,7 +167,7 @@ install themselves in the built-in namespace as the function :func:`!_`.
|
||||||
:class:`NullTranslations` instance if *fallback* is true.
|
:class:`NullTranslations` instance if *fallback* is true.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. 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
|
.. versionchanged:: 3.11
|
||||||
*codeset* parameter is removed.
|
*codeset* parameter is removed.
|
||||||
|
|
|
@ -44,8 +44,8 @@ The module defines the following exception:
|
||||||
cookies from a file. :exc:`LoadError` is a subclass of :exc:`OSError`.
|
cookies from a file. :exc:`LoadError` is a subclass of :exc:`OSError`.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. versionchanged:: 3.3
|
||||||
LoadError was made a subclass of :exc:`OSError` instead of
|
:exc:`LoadError` used to be a subtype of :exc:`IOError`, which is now an
|
||||||
:exc:`IOError`.
|
alias of :exc:`OSError`.
|
||||||
|
|
||||||
|
|
||||||
The following classes are provided:
|
The following classes are provided:
|
||||||
|
|
|
@ -27,8 +27,8 @@ The following exceptions are raised by :mod:`urllib.error` as appropriate:
|
||||||
exception instance.
|
exception instance.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. versionchanged:: 3.3
|
||||||
:exc:`URLError` has been made a subclass of :exc:`OSError` instead
|
:exc:`URLError` used to be a subtype of :exc:`IOError`, which is now an
|
||||||
of :exc:`IOError`.
|
alias of :exc:`OSError`.
|
||||||
|
|
||||||
|
|
||||||
.. exception:: HTTPError(url, code, msg, hdrs, fp)
|
.. exception:: HTTPError(url, code, msg, hdrs, fp)
|
||||||
|
|
|
@ -113,7 +113,7 @@ zipimporter Objects
|
||||||
file wasn't found.
|
file wasn't found.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. 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)
|
.. method:: get_filename(fullname)
|
||||||
|
|
Loading…
Reference in a new issue