Use OSError instead of IOError (#9683)

This commit is contained in:
Nikita Sobolev
2023-02-06 21:56:32 +03:00
committed by GitHub
parent c96079f0df
commit f7cb7f33b2
6 changed files with 7 additions and 7 deletions

View File

@@ -113,7 +113,7 @@ else:
SIGXCPU: Signals
SIGXFSZ: Signals
class ItimerError(IOError): ...
class ItimerError(OSError): ...
ITIMER_PROF: int
ITIMER_REAL: int
ITIMER_VIRTUAL: int

View File

@@ -4,7 +4,7 @@ from urllib.response import addinfourl
__all__ = ["URLError", "HTTPError", "ContentTooShortError"]
class URLError(IOError):
class URLError(OSError):
reason: str | BaseException
def __init__(self, reason: str | BaseException, filename: str | None = None) -> None: ...

View File

@@ -1,3 +1,3 @@
__version__: str
class UnidentifiedImageError(IOError): ...
class UnidentifiedImageError(OSError): ...

View File

@@ -14,8 +14,8 @@ from docutils import TransformSpec
__docformat__: str
class InputError(IOError): ...
class OutputError(IOError): ...
class InputError(OSError): ...
class OutputError(OSError): ...
def check_encoding(stream: Any, encoding: str) -> bool | None: ...
def error_string(err: BaseException) -> str: ...

View File

@@ -1,7 +1,7 @@
from threading import Event
from typing import AnyStr, Generic
class PipeTimeout(IOError): ...
class PipeTimeout(OSError): ...
class BufferedPipe(Generic[AnyStr]):
def __init__(self) -> None: ...

View File

@@ -2,7 +2,7 @@ from typing import Any
from urllib3.exceptions import HTTPError as BaseHTTPError
class RequestException(IOError):
class RequestException(OSError):
response: Any
request: Any
def __init__(self, *args, **kwargs) -> None: ...