From 9b5f5151d2dd19baaea5a77a862c94afb81551aa Mon Sep 17 00:00:00 2001 From: jceresini Date: Mon, 5 Jan 2026 22:46:19 -0500 Subject: [PATCH] [requests] requests.exceptions.JSONDecodeError inherits from json.JSONDecodeError (#15168) --- stubs/requests/requests/exceptions.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/requests/requests/exceptions.pyi b/stubs/requests/requests/exceptions.pyi index 130bce725..24bfd7005 100644 --- a/stubs/requests/requests/exceptions.pyi +++ b/stubs/requests/requests/exceptions.pyi @@ -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