Skip to content

Commit 01d1336

Browse files
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.
1 parent 1406f44 commit 01d1336

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

google/auth/transport/urllib3.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,8 @@ class Request(transport.Request):
106106
credentials.refresh(request)
107107
108108
Args:
109-
http (urllib3.request.RequestMethods): An instance of any urllib3
110-
class that implements :class:`~urllib3.request.RequestMethods`,
111-
usually :class:`urllib3.PoolManager`.
109+
http (urllib3.PoolManager): An instance of a urllib3 class that implements
110+
the request interface (e.g. :class:`urllib3.PoolManager`).
112111
113112
.. automethod:: __call__
114113
"""
@@ -209,7 +208,7 @@ class AuthorizedHttp(RequestMethods): # type: ignore
209208
response = authed_http.request(
210209
'GET', 'https://www.googleapis.com/storage/v1/b')
211210
212-
This class implements :class:`urllib3.request.RequestMethods` and can be
211+
This class implements the urllib3 request interface and can be
213212
used just like any other :class:`urllib3.PoolManager`.
214213
215214
The underlying :meth:`urlopen` implementation handles adding the

0 commit comments

Comments
 (0)