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
.. 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)
: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.
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:
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)
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)