Skip to content

Commit 1c61982

Browse files
committed
feat(google-auth): Remove compatibility code and fallbacks for old versions
1 parent d60598d commit 1c61982

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

packages/google-auth/google/auth/__init__.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"""Google Auth Library for Python."""
1616

1717
import logging
18-
import sys
19-
import warnings
2018

2119
from google.auth import version as google_auth_version
2220
from google.auth._default import (
@@ -32,26 +30,7 @@
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.
5736
logging.getLogger(__name__).addHandler(logging.NullHandler())

packages/google-auth/google/oauth2/__init__.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,4 @@
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)

0 commit comments

Comments
 (0)