From 01d133640fc10653f1cd3ae3f8f9a9fbf32d81af Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 23 Dec 2025 14:46:55 +0000 Subject: [PATCH] docs: update urllib3 RequestMethods docstrings for v2 compatibility The `urllib3.request` module was removed in urllib3 v2.0.0, and `RequestMethods` was moved to a private module `urllib3._request_methods`. This commit updates the docstrings in `google/auth/transport/urllib3.py` to remove references to the now-private `urllib3.request.RequestMethods` class. Instead, it references the public `urllib3.PoolManager` class or the generic request interface, ensuring the documentation remains accurate for both urllib3 v1 and v2 users. This addresses the documentation aspect of PR #1290. --- google/auth/transport/urllib3.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/google/auth/transport/urllib3.py b/google/auth/transport/urllib3.py index fa9e018a2..de07007a9 100644 --- a/google/auth/transport/urllib3.py +++ b/google/auth/transport/urllib3.py @@ -106,9 +106,8 @@ class Request(transport.Request): credentials.refresh(request) Args: - http (urllib3.request.RequestMethods): An instance of any urllib3 - class that implements :class:`~urllib3.request.RequestMethods`, - usually :class:`urllib3.PoolManager`. + http (urllib3.PoolManager): An instance of a urllib3 class that implements + the request interface (e.g. :class:`urllib3.PoolManager`). .. automethod:: __call__ """ @@ -209,7 +208,7 @@ class AuthorizedHttp(RequestMethods): # type: ignore response = authed_http.request( 'GET', 'https://www.googleapis.com/storage/v1/b') - This class implements :class:`urllib3.request.RequestMethods` and can be + This class implements the urllib3 request interface and can be used just like any other :class:`urllib3.PoolManager`. The underlying :meth:`urlopen` implementation handles adding the