From cb0b15b18dfcda726b3b1b2278f9a9e3e5b24f2a Mon Sep 17 00:00:00 2001 From: Valerio Gianella <49408327+valeriogianella@users.noreply.github.com> Date: Sat, 19 Jul 2025 16:43:00 +0200 Subject: [PATCH] gh-135468: Improve ``BaseHandler.http_error_default()`` parameter descriptions (GH-136797) (cherry picked from commit 57acd65a30f8cb1f3a3cc01322f03215017f5caa) Co-authored-by: Valerio Gianella <49408327+valeriogianella@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> --- Doc/library/urllib.request.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 58bd111b5cc374..1e716715fd9bed 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -829,10 +829,13 @@ The following attribute and methods should only be used by classes derived from errors. It will be called automatically by the :class:`OpenerDirector` getting the error, and should not normally be called in other circumstances. - *req* will be a :class:`Request` object, *fp* will be a file-like object with - the HTTP error body, *code* will be the three-digit code of the error, *msg* - will be the user-visible explanation of the code and *hdrs* will be a mapping - object with the headers of the error. + :class:`OpenerDirector` will call this method with five positional arguments: + + 1. a :class:`Request` object, + #. a file-like object with the HTTP error body, + #. the three-digit code of the error, as a string, + #. the user-visible explanation of the code, as as string, and + #. the headers of the error, as a mapping object. Return values and exceptions raised should be the same as those of :func:`urlopen`.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: