Skip to content

Commit 94ba2c2

Browse files
committed
chore: add PEP 0810 comment above __lazy_modules__
1 parent c4a53ce commit 94ba2c2

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333

3434
_LOGGER = logging.getLogger(__name__)
3535

36+
# PEP 0810: Explicit Lazy Imports
37+
# Python 3.15+ natively intercepts and defers these imports.
38+
# Developers can disable this behavior and force eager imports.
39+
# For more information, see:
40+
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
41+
# Older Python versions safely ignore this variable.
3642
__lazy_modules__: Set[str] = {"grpc"}
3743

3844

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
import google.auth.transport._mtls_helper
4343
from google.oauth2 import service_account
4444

45+
# PEP 0810: Explicit Lazy Imports
46+
# Python 3.15+ natively intercepts and defers these imports.
47+
# Developers can disable this behavior and force eager imports.
48+
# For more information, see:
49+
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
50+
# Older Python versions safely ignore this variable.
4551
__lazy_modules__: Set[str] = {"requests", "requests.adapters", "requests.exceptions"}
4652

4753
_LOGGER = logging.getLogger(__name__)

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
from google.auth.transport import _mtls_helper
5959
from google.oauth2 import service_account
6060

61+
# PEP 0810: Explicit Lazy Imports
62+
# Python 3.15+ natively intercepts and defers these imports.
63+
# Developers can disable this behavior and force eager imports.
64+
# For more information, see:
65+
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
66+
# Older Python versions safely ignore this variable.
6167
__lazy_modules__: Set[str] = {
6268
"urllib3",
6369
"urllib3.exceptions",

0 commit comments

Comments
 (0)