Skip to content

Commit 1681884

Browse files
committed
fix: resolve linting failures and add nested requests modules to __lazy_modules__
1 parent d0ca3c1 commit 1681884

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

packages/google-auth/google/auth/_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,5 +564,5 @@ class HeapDummy(object):
564564
Inheriting from HeapDummy instead of built-in `object` ensures that Python's
565565
memory layout check passes when we swap bases to another heap-allocated class.
566566
"""
567-
pass
568567

568+
pass

packages/google-auth/google/auth/transport/requests.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@
3131
# For more information, see:
3232
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
3333
# Older Python versions safely ignore this variable.
34-
__lazy_modules__: Set[str] = {"requests", "requests.adapters", "requests.exceptions"}
34+
__lazy_modules__: Set[str] = {
35+
"requests",
36+
"requests.adapters",
37+
"requests.exceptions",
38+
"requests.packages",
39+
"requests.packages.urllib3",
40+
"requests.packages.urllib3.util",
41+
"requests.packages.urllib3.util.ssl_",
42+
}
3543

3644

3745
if importlib.util.find_spec("requests") is None:

packages/google-auth/google/auth/transport/urllib3.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import http.client as http_client
2121
import logging
22+
from typing import Set
2223
import warnings
2324

2425
# Certifi is Mozilla's certificate bundle. Urllib3 needs a certificate bundle
@@ -51,8 +52,6 @@
5152
) from caught_exc
5253

5354

54-
from typing import Set
55-
5655
from google.auth import _helpers
5756
from google.auth import exceptions
5857
from google.auth import transport

0 commit comments

Comments
 (0)