File tree Expand file tree Collapse file tree
packages/google-auth/google Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515"""Google Auth Library for Python."""
1616
1717import logging
18- import sys
19- import warnings
2018
2119from google .auth import version as google_auth_version
2220from google .auth ._default import (
3230__all__ = ["default" , "load_credentials_from_file" , "load_credentials_from_dict" ]
3331
3432
35- class Python37DeprecationWarning (DeprecationWarning ): # pragma: NO COVER
36- """
37- Deprecation warning raised when Python 3.7 runtime is detected.
38- Python 3.7 support will be dropped after January 1, 2024.
39- """
4033
41- pass
42-
43-
44- # Raise warnings for deprecated versions
45- eol_message = (
46- "You are using a Python version {} past its end of life. Google will update "
47- "google-auth with critical bug fixes on a best-effort basis, but not "
48- "with any other fixes or features. Please upgrade your Python version, "
49- "and then update google-auth."
50- )
51- if sys .version_info .major == 3 and sys .version_info .minor == 8 : # pragma: NO COVER
52- warnings .warn (eol_message .format ("3.8" ), FutureWarning )
53- elif sys .version_info .major == 3 and sys .version_info .minor == 9 : # pragma: NO COVER
54- warnings .warn (eol_message .format ("3.9" ), FutureWarning )
5534
5635# Set default logging handler to avoid "No handler found" warnings.
5736logging .getLogger (__name__ ).addHandler (logging .NullHandler ())
Original file line number Diff line number Diff line change 1414
1515"""Google OAuth 2.0 Library for Python."""
1616
17- import sys
18- import warnings
1917
20-
21- class Python37DeprecationWarning (DeprecationWarning ): # pragma: NO COVER
22- """
23- Deprecation warning raised when Python 3.7 runtime is detected.
24- Python 3.7 support will be dropped after January 1, 2024.
25- """
26-
27- pass
28-
29-
30- # Raise warnings for deprecated versions
31- eol_message = (
32- "You are using a Python version {} past its end of life. Google will update "
33- "google-auth with critical bug fixes on a best-effort basis, but not "
34- "with any other fixes or features. Please upgrade your Python version, "
35- "and then update google-auth."
36- )
37- if sys .version_info .major == 3 and sys .version_info .minor == 8 : # pragma: NO COVER
38- warnings .warn (eol_message .format ("3.8" ), FutureWarning )
39- elif sys .version_info .major == 3 and sys .version_info .minor == 9 : # pragma: NO COVER
40- warnings .warn (eol_message .format ("3.9" ), FutureWarning )
You can’t perform that action at this time.
0 commit comments