Skip to content

Better communicate that IOError and WindowsError are just aliases of OSError now #110497

Closed
@sobolevn

Description

@sobolevn

Bug report

While working on some Windows-related typeshed PRs, I've noticed that some places in docs are very clear about this change. For example:

.. versionchanged:: 3.3
   :exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`.

It is clear that OSError is the same as IOError now.

But, there are several places where it is not clear. Example:

If no :file:`.mo` file is found, this function raises :exc:`OSError` if
*fallback* is false (which is the default), and returns a
:class:`NullTranslations` instance if *fallback* is true.
.. versionchanged:: 3.3
:exc:`IOError` used to be raised instead of :exc:`OSError`.

It might be confusing: people might think that right now OSError and IOError are different.
Let's add notes about explicit alias to several places that miss it.

Linked PRs

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions