[requests] requests.exceptions.JSONDecodeError inherits from json.JSONDecodeError (#15168)

This commit is contained in:
jceresini
2026-01-05 22:46:19 -05:00
committed by GitHub
parent e4f8258330
commit 9b5f5151d2
+2 -1
View File
@@ -1,3 +1,4 @@
from json import JSONDecodeError as CompatJSONDecodeError
from typing import Any
from urllib3.exceptions import HTTPError as BaseHTTPError
@@ -13,7 +14,7 @@ class RequestException(OSError):
) -> None: ...
class InvalidJSONError(RequestException): ...
class JSONDecodeError(InvalidJSONError): ...
class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError): ...
class HTTPError(RequestException):
request: Request | PreparedRequest | Any